/* Global Styles - Dark Theme (Default) */
:root, [data-theme="dark"] {
    /* Primary Brand Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-bg: rgba(99, 102, 241, 0.12);

    /* Status Colors */
    --success: #22c55e;
    --success-light: rgba(34, 197, 94, 0.15);
    --success-dark: #16a34a;
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.15);
    --danger-dark: #dc2626;
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.15);
    --running: #3b82f6;
    --running-light: rgba(59, 130, 246, 0.15);

    /* Neutral Colors - Dark Scale */
    --gray-50: #18181b;
    --gray-100: #1f1f23;
    --gray-200: #27272a;
    --gray-300: #3f3f46;
    --gray-400: #71717a;
    --gray-500: #a1a1aa;
    --gray-600: #d4d4d8;
    --gray-700: #e4e4e7;
    --gray-800: #f4f4f5;
    --gray-900: #fafafa;

    /* Background Layers */
    --bg-base: #09090b;
    --bg-surface: #18181b;
    --bg-elevated: #1f1f23;
    --bg-overlay: #27272a;

    /* Table Header */
    --table-header-bg: #1f1f23;
    --table-header-text: #e4e4e7;
    --table-header-hover: #27272a;

    /* Card & Surface */
    --card-bg: #18181b;
    --card-border: #27272a;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);

    /* Text */
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    /* Gradients */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    --success-gradient: linear-gradient(135deg, #22c55e 0%, #4ade80 100%);
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --info-gradient: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    --dark-gradient: linear-gradient(135deg, #18181b 0%, #1f1f23 100%);

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 24px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Font Sizes */
    --font-xs: 0.7rem;
    --font-sm: 0.75rem;
    --font-base: 0.85rem;
    --font-md: 0.9rem;
    --font-lg: 1rem;
}

/* Light Theme */
[data-theme="light"] {
    /* Primary Brand Colors - Same accent */
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #6366f1;
    --primary-bg: rgba(79, 70, 229, 0.08);

    /* Status Colors - Slightly adjusted for light bg */
    --success: #16a34a;
    --success-light: rgba(22, 163, 74, 0.12);
    --success-dark: #15803d;
    --danger: #dc2626;
    --danger-light: rgba(220, 38, 38, 0.1);
    --danger-dark: #b91c1c;
    --warning: #d97706;
    --warning-light: rgba(217, 119, 6, 0.12);
    --running: #2563eb;
    --running-light: rgba(37, 99, 235, 0.1);

    /* Neutral Colors - Light Scale with better contrast */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Background Layers - With subtle shades */
    --bg-base: #f1f5f9;
    --bg-surface: #f8fafc;
    --bg-elevated: #ffffff;
    --bg-overlay: #e2e8f0;

    /* Card backgrounds for light mode */
    --card-bg: #ffffff;
    --card-border: #e2e8f0;

    /* Table Header */
    --table-header-bg: #e2e8f0;
    --table-header-text: #1e293b;
    --table-header-hover: #cbd5e1;

    /* Card & Surface */
    --card-bg: #ffffff;
    --card-border: #cbd5e1;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);

    /* Text - Dark text on light bg */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #475569;

    /* Gradients */
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    --dark-gradient: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-base);
    min-height: 100vh;
    color: var(--text-primary);
    padding: 0;
    padding-top: 0;
    position: relative;
    overflow-x: auto;
    max-width: 100vw;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Global Header with AMD ROCm Logo */
.global-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--card-border);
    padding: 10px 30px;
    position: sticky;
    top: 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 21, 41, 0.08);
}

.global-header-content {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.amd-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
}

.logo-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
}

.dashboard-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.header-links {
    display: flex;
    gap: 20px;
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.2rem;
    position: relative;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.theme-icon-dark,
.theme-icon-light {
    position: absolute;
    transition: opacity 0.2s ease, transform 0.3s ease;
}

/* Dark theme: show moon, hide sun */
:root .theme-icon-dark,
[data-theme="dark"] .theme-icon-dark {
    opacity: 1;
    transform: rotate(0deg);
}

:root .theme-icon-light,
[data-theme="dark"] .theme-icon-light {
    opacity: 0;
    transform: rotate(-90deg);
}

/* Light theme: show sun, hide moon */
[data-theme="light"] .theme-icon-dark {
    opacity: 0;
    transform: rotate(90deg);
}

[data-theme="light"] .theme-icon-light {
    opacity: 1;
    transform: rotate(0deg);
}

[data-theme="light"] .theme-toggle {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
}

.header-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Light theme header adjustments */
[data-theme="light"] .global-header {
    background: #e2e8f0;
    border-bottom: 1px solid #cbd5e1;
}

[data-theme="light"] .header-link {
    color: #475569;
    background: rgba(0, 0, 0, 0.03);
    border-color: #e2e8f0;
}

[data-theme="light"] .header-link:hover {
    color: #1e293b;
    background: rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

[data-theme="light"] .dashboard-title {
    color: #1e293b;
}

[data-theme="light"] .logo-divider {
    background: #e2e8f0;
}

.github-icon, .docs-icon {
    font-size: 1rem;
}

/* Container adjustment for header */
.container {
    padding: 20px;
}

/* Clean background - no animation */

.container {
    max-width: 1920px;
    margin: 0 auto;
    background: transparent;
    padding: 20px 30px;
    overflow-x: visible;
    width: 100%;
    box-sizing: border-box;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

h1 {
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

h1 i {
    color: var(--primary);
}

.header-info {
    display: flex;
    align-items: center;
    gap: 30px;
    font-size: 0.9rem;
}

.branch-info, .last-updated {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
}

.last-fetched {
    opacity: 0.85;
    font-size: 0.9em;
}

.branch-info strong {
    color: #333;
}

.refresh-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    min-height: 40px;
    box-sizing: border-box;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.refresh-btn:active {
    transform: translateY(0);
}

.refresh-btn i {
    transition: transform 0.3s;
}

.refresh-btn:hover i {
    transform: rotate(180deg);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
    max-width: 100%;
}

.dashboard-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--card-border);
    max-width: 100%;
    overflow: visible;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.dashboard-section:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.dashboard-section.full-width {
    grid-column: 1 / -1;
}

.dashboard-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-section h2 i {
    color: var(--primary);
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.table-container.horizontal-scroll {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    transition: background-color 0.3s ease;
}

th {
    background: var(--table-header-bg);
    padding: var(--spacing-md) var(--spacing-sm);
    text-align: left;
    font-weight: 600;
    color: var(--table-header-text);
    font-size: var(--font-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-bottom: 1px solid var(--gray-400);
    position: sticky;
    top: 0;
    z-index: 10;
}

td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--card-border);
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: background-color 0.3s ease;
}

tr:hover {
    background: var(--bg-elevated);
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-style: italic;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    padding: 8px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    min-width: 70px;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.status-badge.pass {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    box-shadow: 0 3px 8px rgba(56, 239, 125, 0.3);
    font-weight: 600;
}

/* Status link hover effects */
a.status-link {
    text-decoration: none;
    display: inline-block;
}

a.status-link:hover .status-badge {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.status-badge.fail {
    background: linear-gradient(135deg, #fc4a1a 0%, #f7b733 100%);
    color: white;
    box-shadow: 0 3px 8px rgba(252, 74, 26, 0.3);
    font-weight: 600;
}

.status-badge.skipped {
    background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
    color: white;
    box-shadow: 0 3px 8px rgba(107, 114, 128, 0.3);
    border: 2px solid #52525b;
}

.status-badge.running {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: #1f2937;
    box-shadow: 0 3px 8px rgba(245, 158, 11, 0.3);
    border: 2px solid #d97706;
}

.status-badge.in-progress {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    color: white;
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.3);
    animation: pulse 2s infinite;
}

.status-badge.cancelled {
    background: #f59e0b;
    color: white;
}

.status-badge.no-data {
    background: #4b5563;
    color: #d1d5db;
    border: 1px solid #374151;
}

[data-theme="light"] .status-badge.no-data {
    background: #d1d5db;
    color: #4b5563;
    border: 1px solid #9ca3af;
}

.status-badge.pending {
    background: #818cf8;
    color: white;
    animation: pulse 2s infinite;
}

.status-badge.unknown {
    background: #d1d5db;
    color: #374151;
}

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

/* PyTorch Tables */
/* Fixed column widths for consistent table layout */
.col-arch { width: 140px; min-width: 140px; }
.col-status { width: 130px; min-width: 130px; }
.col-tarball { width: 110px; min-width: 110px; }
.col-deb { width: 100px; min-width: 100px; }
.col-rpm { width: 100px; min-width: 100px; }
.col-wheel-pkg { width: 90px; min-width: 90px; }

/* Sticky columns for PyTorch scrollable tables */
.horizontal-scroll {
    position: relative;
}

.pytorch-table .sticky-left {
    position: -webkit-sticky !important;
    position: sticky !important;
    left: 0 !important;
    z-index: 4;
    background: var(--card-bg);
}

.pytorch-table .sticky-right {
    position: -webkit-sticky !important;
    position: sticky !important;
    z-index: 4;
    background: var(--card-bg);
}

.pytorch-table thead .sticky-left {
    z-index: 12;
    background: var(--table-header-bg);
}

.pytorch-table thead .sticky-right {
    z-index: 12;
    background: var(--table-header-bg);
}

.pytorch-table thead th {
    z-index: 10;
}

.pytorch-table .sticky-left::after {
    content: '';
    position: absolute;
    top: 0;
    right: -4px;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to right, rgba(0,0,0,0.15), transparent);
    pointer-events: none;
}

.pytorch-table .sticky-right-first::before {
    content: '';
    position: absolute;
    top: 0;
    left: -4px;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to left, rgba(0,0,0,0.15), transparent);
    pointer-events: none;
}

[data-theme="light"] .pytorch-table .sticky-left,
[data-theme="light"] .pytorch-table .sticky-right {
    background: #fff;
}
[data-theme="light"] .pytorch-table thead .sticky-left,
[data-theme="light"] .pytorch-table thead .sticky-right {
    background: var(--table-header-bg);
}

.pytorch-table tbody tr:hover .sticky-left,
.pytorch-table tbody tr:hover .sticky-right {
    background: var(--card-bg);
}
[data-theme="light"] .pytorch-table tbody tr:hover .sticky-left,
[data-theme="light"] .pytorch-table tbody tr:hover .sticky-right {
    background: #f1f5f9;
}

.pytorch-table {
    font-size: 0.75rem;
}

.pytorch-table th {
    padding: 10px 6px;
    text-align: center;
    white-space: nowrap;
    font-size: 0.75rem;
}

.pytorch-table td {
    padding: 6px 4px;
    text-align: center;
}

.pytorch-table .status-badge {
    font-size: 0.65rem;
    padding: 4px 4px;
    min-width: 36px;
    min-height: 24px;
    border-radius: 6px;
}

/* Links */
a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.2s;
}

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

.build-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
}

.build-link i {
    font-size: 0.75rem;
}

/* Legend */
.legend,
.legend-section {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--card-border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    margin-top: 20px;
}

.legend h3,
.legend-section h4 {
    margin-bottom: 15px;
    color: var(--text-primary) !important;
    font-size: 1rem;
    font-weight: 600;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary) !important;
}

/* Legend status badges - make them visible with borders */
.legend-item .status-badge {
    min-width: 32px;
    min-height: 28px;
    padding: 4px 8px;
    font-size: 0.8rem;
    border: 2px solid;
}

.legend-item .status-badge.success {
    background: #059669;
    color: white;
    border-color: #047857;
}

.legend-item .status-badge.failure {
    background: #dc2626;
    color: white;
    border-color: #b91c1c;
}

.legend-item .status-badge.running {
    background: #f59e0b;
    color: #1f2937;
    border-color: #d97706;
}

.legend-item .status-badge.skipped {
    background: #6b7280;
    color: white;
    border-color: #4b5563;
}

.legend-items {
    border-color: var(--card-border) !important;
}

.legend-tip {
    border-top: 1px solid var(--card-border);
}

.time-badge {
    background: var(--bg-overlay);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }

    .header-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
    }

    .ci-run-dropdown {
        min-width: 100%;
        max-width: 100%;
    }

    .version-dropdown {
        min-width: 200px;
        max-width: 100%;
    }
}

/* Intermediate breakpoint for mobile desktop mode (~980px viewport) */
@media (max-width: 1024px) {
    .container {
        padding: 12px 16px;
    }

    .global-header {
        padding: 8px 16px;
    }

    .amd-logo {
        height: 32px;
    }

    .dashboard-title {
        font-size: 1rem;
    }

    .header-links {
        gap: 8px;
    }

    .header-link {
        font-size: 0.8rem;
        padding: 6px 10px;
    }

    .tab-navigation {
        gap: 3px;
        padding: 3px;
    }

    .tab-button {
        padding: 8px 12px;
        font-size: 12px;
    }

    .dashboard-section {
        padding: 16px;
    }

    .dashboard-section h2 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .dashboard-grid {
        gap: 16px;
        margin-bottom: 16px;
    }

    .col-arch { width: 120px; min-width: 120px; }
    .col-status { width: 100px; min-width: 100px; }
    .col-tarball { width: 95px; min-width: 95px; }
    .col-deb { width: 90px; min-width: 90px; }
    .col-rpm { width: 90px; min-width: 90px; }
    .col-wheel-pkg { width: 95px; min-width: 95px; }

    .status-badge {
        min-width: 60px;
        min-height: 30px;
        font-size: 0.7rem;
        padding: 5px 6px;
    }

    #releases-tab .status-badge {
        width: 75px;
        min-width: 75px;
        max-width: 75px;
        height: 40px;
        min-height: 40px;
    }

    #releases-tab .status-badge .time-info {
        font-size: 8px;
        max-width: 70px;
    }

    #releases-tab .pytorch-table .status-badge {
        width: 60px !important;
        min-width: 60px !important;
        max-width: 60px !important;
        height: 36px !important;
        min-height: 36px !important;
        font-size: 0.7rem;
    }

    #ci-nightly-tab .status-badge,
    #ci-nightly-tab .status-badge.shard {
        width: 75px !important;
        min-width: 75px !important;
        max-width: 75px !important;
        height: 40px !important;
        min-height: 40px !important;
    }

    .pytorch-table {
        font-size: 0.65rem;
    }

    .pytorch-table th,
    .pytorch-table td {
        padding: 4px 3px;
    }

    .pytorch-table .status-badge {
        font-size: 0.6rem;
        padding: 3px 3px;
        min-width: 32px;
        min-height: 22px;
    }

    .status-table th,
    .status-table td {
        padding: 8px 6px;
    }

    .status-table {
        font-size: 0.82rem;
    }

    .build-info-panel {
        padding: 16px !important;
    }

    .workflow-runs-grid {
        gap: 10px !important;
    }

    h1 {
        font-size: 1.5rem;
    }

    .shard-badge {
        min-width: 60px;
        max-width: 72px;
        font-size: 10px;
    }

    .download-btn {
        font-size: 0.7rem;
        padding: 5px 10px;
        min-width: 70px;
        min-height: 28px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 8px;
    }

    .container {
        padding: 10px;
        border-radius: 0;
        max-width: 100%;
        overflow-x: visible;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 25px;
        padding-bottom: 15px;
    }

    h1 {
        font-size: 1.3rem;
        line-height: 1.3;
        word-wrap: break-word;
    }

    .header-info {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header-info > span {
        width: 100%;
    }

    .version-selector {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .version-selector label {
        margin-right: 0 !important;
    }

    .version-dropdown,
    .ci-run-dropdown {
        min-width: 100%;
        max-width: 100%;
        width: 100%;
        font-size: 14px;
        padding: 12px;
    }

    .branch-info,
    .last-updated {
        font-size: 0.85rem;
    }

    .refresh-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }

    .dashboard-section {
        padding: 12px;
        border-radius: 10px;
    }

    .dashboard-section h2 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }

    .legend {
        padding: 15px;
    }

    .legend-items {
        flex-direction: column;
        gap: 10px;
    }

    .legend-item {
        font-size: 0.85rem;
    }

    /* Global Header Mobile */
    .global-header {
        padding: 8px 12px;
    }

    .global-header-content {
        gap: 8px;
    }

    .amd-logo {
        height: 30px;
    }

    .dashboard-title {
        font-size: 1rem;
    }

    .header-links {
        gap: 6px;
    }

    .header-link {
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    /* Tab Navigation Mobile */
    .tab-navigation {
        flex-wrap: wrap;
        gap: 6px;
        padding: 8px;
    }

    .tab-button {
        flex: 1 1 auto;
        text-align: center;
        padding: 8px 10px;
        font-size: 0.75rem;
        min-width: 0;
    }

    /* Tables Mobile */
    .status-table {
        font-size: 0.8rem;
    }

    .status-table th,
    .status-table td {
        padding: 8px 6px;
    }

    .col-arch { width: 100px; min-width: 100px; }
    .col-status { width: 90px; min-width: 90px; }
    .col-tarball { width: 80px; min-width: 80px; }
    .col-deb { width: 75px; min-width: 75px; }
    .col-rpm { width: 75px; min-width: 75px; }
    .col-wheel-pkg { width: 80px; min-width: 80px; }

    .pytorch-table {
        font-size: 0.6rem;
    }

    .pytorch-table th,
    .pytorch-table td {
        padding: 4px 2px;
    }

    .pytorch-table .status-badge {
        font-size: 0.55rem;
        padding: 3px 2px;
        min-width: 28px;
        min-height: 20px;
    }

    .status-badge {
        font-size: 0.65rem;
        padding: 5px 6px;
        min-width: 55px;
        min-height: 28px;
    }

    /* Download buttons mobile */
    .download-btn {
        font-size: 0.65rem;
        padding: 4px 8px;
        min-width: 60px;
        min-height: 26px;
    }

    .download-btn .dl-icon {
        display: none;
    }

    .download-btn-group {
        gap: 3px;
    }

    /* Build info panel mobile */
    .workflow-runs-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
}

@media (max-width: 480px) {
    body {
        padding: 4px;
    }

    .container {
        padding: 8px;
        border-radius: 8px;
    }

    .global-header {
        padding: 6px 8px;
    }

    .logo-divider {
        display: none;
    }

    .header-link span:not(.github-icon):not(.docs-icon) {
        display: none;
    }

    h1 {
        font-size: 1rem;
    }

    .dashboard-section {
        padding: 8px;
        border-radius: 8px;
    }

    .dashboard-section h2 {
        font-size: 0.9rem;
    }

    .col-arch { width: 80px; min-width: 80px; }
    .col-status { width: 70px; min-width: 70px; }
    .col-tarball,
    .col-deb,
    .col-rpm,
    .col-wheel-pkg { width: 65px; min-width: 65px; }

    .status-table th,
    .status-table td {
        padding: 6px 3px;
        font-size: 0.7rem;
    }

    .pytorch-table {
        font-size: 0.5rem;
    }

    .pytorch-table th,
    .pytorch-table td {
        padding: 2px 1px;
    }

    .status-badge {
        font-size: 0.55rem;
        padding: 3px 3px;
        min-width: 40px;
        min-height: 22px;
    }

    .download-btn {
        font-size: 0.6rem;
        padding: 3px 6px;
        min-width: 50px;
        min-height: 22px;
    }

    .tab-button {
        font-size: 0.65rem;
        padding: 6px 8px;
    }

    .legend-item {
        font-size: 0.75rem;
    }

    .build-info-panel {
        padding: 10px !important;
    }
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #6366f1;
    animation: spin 1s ease-in-out infinite;
    vertical-align: middle;
}

.loading-spinner.large {
    width: 32px;
    height: 32px;
    border-width: 4px;
}

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

/* Loading overlay for tables */
.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: #6366f1;
    font-weight: 500;
}

.loading-overlay .loading-spinner {
    flex-shrink: 0;
}

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

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

/* ROCm Version Display */
.rocm-version {
    margin: 15px 0;
    padding: 12px 30px;
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 50%, #9da5b1 100%);
    border-radius: 50px;
    display: inline-block;
    box-shadow: 0 8px 16px rgba(139, 92, 246, 0.3);
    animation: fadeIn 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.rocm-version::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.rocm-version .version-label {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    margin-right: 12px;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rocm-version .version-value {
    color: #ffffff;
    font-weight: 800;
    font-size: 1.3em;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

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

/* Enhanced table row interactions */
.status-table tbody tr {
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.status-table tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.05);
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pytorch-table tbody tr {
    transition: background-color 0.2s ease;
}

.pytorch-table tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.05);
}

/* Timestamp styling */
td.timestamp {
    color: #6b7280;
    font-size: 0.9em;
    font-style: italic;
}

/* Architecture cell emphasis */
td strong {
    color: #4b5563;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* GPU Architecture highlighting */
.status-table td:first-child,
.pytorch-table td:first-child {
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    padding-left: 20px;
}

.status-table td:first-child::before,
.pytorch-table td:first-child::before {
    content: '▸';
    position: absolute;
    left: 8px;
    color: #818cf8;
    transition: transform 0.3s ease;
}

.status-table tr:hover td:first-child::before,
.pytorch-table tr:hover td:first-child::before {
    transform: translateX(3px);
}

/* Better loading state */
td.loading {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 30px;
    background: var(--card-bg);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

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

/* Tab Navigation */
.tab-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--card-bg);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.tab-button {
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

.tab-button.active {
    background: var(--primary);
    color: #ffffff;
}

.tab-content {
    display: block;
    max-width: 100%;
    overflow-x: visible;
}

.repo-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--card-border);
}

.repo-section:last-of-type {
    border-bottom: none;
}

/* ============= Repo CI HUD Table (dynamic category columns) ============= */

.repo-ci-hud-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.repo-ci-hud-table thead {
    background: var(--card-bg);
}
.repo-ci-hud-table thead th {
    background: var(--card-bg);
    padding: 12px 14px;
    text-align: left;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
}

.repo-ci-hud-table thead th.sticky-col,
.repo-ci-hud-table tbody td.sticky-col {
    box-sizing: border-box;
}
.repo-ci-hud-table thead th.sticky-col {
    position: sticky;
    z-index: 3;
    background: var(--card-bg);
}
[data-theme="light"] .repo-ci-hud-table thead th.sticky-col {
    background: var(--card-bg);
}
.repo-ci-hud-table thead th.col-sha { left: 0; width: 80px; min-width: 80px; }
.repo-ci-hud-table thead th.col-msg { left: 80px; width: 220px; min-width: 220px; }
.repo-ci-hud-table thead th.col-auth { left: 300px; width: 110px; min-width: 110px; }
.repo-ci-hud-table thead th.col-time { left: 410px; width: 80px; min-width: 80px; }

.repo-ci-hud-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--card-border);
    vertical-align: middle;
}

.repo-ci-hud-table tbody td.sticky-col {
    position: sticky;
    z-index: 1;
    background: var(--card-bg);
}
[data-theme="light"] .repo-ci-hud-table tbody td.sticky-col {
    background: var(--card-bg);
}
.repo-ci-hud-table tbody td.col-sha { left: 0; width: 80px; min-width: 80px; }
.repo-ci-hud-table tbody td.col-sha a {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.82rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.repo-ci-hud-table tbody td.col-sha a:hover { text-decoration: underline; }
.repo-ci-hud-table tbody td.col-msg {
    left: 80px; width: 220px; min-width: 220px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 0.78rem; color: var(--text-primary);
}
.repo-ci-hud-table tbody td.col-auth {
    left: 300px; width: 110px; min-width: 110px;
    font-size: 0.75rem; white-space: nowrap;
}
.repo-ci-hud-table tbody td.col-time {
    left: 410px; width: 80px; min-width: 80px;
}
/* Last sticky column gets a shadow edge to separate from scrolling content */
.repo-ci-hud-table thead th.col-time {
    box-shadow: 4px 0 8px -2px rgba(0, 0, 0, 0.3);
}
.repo-ci-hud-table tbody td.col-time {
    box-shadow: 4px 0 8px -2px rgba(0, 0, 0, 0.15);
}
.repo-ci-hud-table tbody td.col-auth img.author-avatar {
    width: 18px; height: 18px; border-radius: 50%; vertical-align: middle; margin-right: 4px;
}
.repo-ci-hud-table tbody td.col-time {
    font-size: 0.72rem; color: var(--text-muted); white-space: nowrap;
}
.repo-ci-hud-table tbody td.col-cat {
    text-align: center; white-space: nowrap;
}

/* Row highlighting */
.repo-ci-row { cursor: pointer; transition: background 0.15s; }
.repo-ci-row:hover { background: rgba(99, 102, 241, 0.05); }
.repo-ci-row.repo-row-fail { background: rgba(239, 68, 68, 0.06); }
.repo-ci-row.repo-row-fail:hover { background: rgba(239, 68, 68, 0.1); }
.repo-ci-row.repo-row-run { background: rgba(245, 158, 11, 0.05); }

/* Category badges */
.cat-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 36px;
    text-align: center;
}
.cat-pass { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.cat-fail { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.cat-run { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.cat-na { background: transparent; color: var(--text-muted); font-weight: 400; }

/* Expanded detail row */
.repo-ci-expand-row td {
    padding: 0 !important;
    background: var(--bg-overlay, rgba(0,0,0,0.02));
}

.repo-expand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 16px 20px;
}

.repo-expand-cat h4 {
    font-size: 0.8rem;
    margin: 0 0 8px 0;
    color: var(--text-secondary);
    font-weight: 600;
}

.repo-expand-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.repo-expand-items .build-status {
    white-space: normal;
    word-break: break-word;
    font-size: 0.7rem;
    line-height: 1.3;
    padding: 3px 8px;
    display: inline-block;
}

/* Light theme overrides */
[data-theme="light"] .repo-ci-hud-table thead th {
    background: #f8fafc;
    color: #475569;
    border-bottom-color: #e2e8f0;
}
[data-theme="light"] .repo-ci-hud-table tbody td.sticky-col {
    background: #fff;
}
[data-theme="light"] .repo-ci-row:hover td.sticky-col {
    background: #f1f5f9;
}
[data-theme="light"] .repo-ci-hud-table tbody td {
    border-bottom-color: #e2e8f0;
}
[data-theme="light"] .repo-ci-expand-row td {
    background: #f8fafc;
}

/* CI Specific Styles - Reusing main dashboard styles */

/* Test Artifacts Table - uses pytorch-table styles for consistency */

/* Version Dropdown Styling */
.version-dropdown {
    padding: 8px 15px;
    background: rgba(79, 70, 229, 0.35);
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: #f3f4f6;
    border-radius: 10px;
    font-weight: 600;
    min-width: 250px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.version-dropdown:hover {
    background: rgba(79, 70, 229, 0.45);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
    border-color: rgba(139, 92, 246, 0.5);
}

.version-dropdown:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.5);
}

/* Dropdown options styling */
.version-dropdown option {
    background: #1a1a2e;
    color: #f3f4f6;
    padding: 10px;
    font-weight: normal;
}

.version-dropdown option:hover {
    background: #16213e;
}

/* Selected option */
.version-dropdown option:checked {
    background: #4f46e5;
    color: white;
}

/* Header Title Styling */
h1 {
    font-size: 1.8rem !important;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 1px;
    margin-bottom: 20px;
}

h2 {
    font-size: 1.3rem;
    font-weight: 600;
}

/* CI Run Dropdown Styling - matches version dropdown */
.ci-run-dropdown {
    padding: 10px 14px;
    background: rgba(79, 70, 229, 0.35);
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: #f3f4f6;
    border-radius: 10px;
    min-width: 650px;
    max-width: 850px;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.ci-run-dropdown:hover {
    background: rgba(79, 70, 229, 0.45);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.ci-run-dropdown:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.4);
}

.ci-run-dropdown option {
    background: #1a1a2e;
    color: #f3f4f6;
    padding: 12px 16px;
    font-size: 12px;
    line-height: 1.6;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-weight: 400;
}

.ci-run-dropdown option:hover {
    background: #16213e;
}

.ci-run-dropdown option[data-status="success"] {
    background: #1a1a2e;
    border-left: 4px solid #10b981;
    padding-left: 12px;
}

.ci-run-dropdown option[data-status="failure"] {
    background: #1a1a2e;
    border-left: 4px solid #ef4444;
    padding-left: 12px;
}

.ci-run-dropdown option[data-status="in_progress"] {
    background: #1a1a2e;
    border-left: 4px solid #3b82f6;
    padding-left: 12px;
}

.ci-run-dropdown option[data-status="queued"] {
    background: #1a1a2e;
    border-left: 4px solid #f59e0b;
    padding-left: 12px;
}

.ci-run-dropdown option[data-status="completed"] {
    background: #1a1a2e;
    border-left: 4px solid #10b981;
    padding-left: 12px;
}

.ci-run-dropdown option[data-status="cancelled"] {
    background: #1a1a2e;
    border-left: 4px solid #6b7280;
    padding-left: 12px;
}

/* Sharded test container styles */
.shard-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: center;
    align-items: stretch;
    padding: 2px;
    max-width: 100%;
}

.shard-badge {
    flex: 0 0 auto;
    min-width: 70px;
    max-width: 85px;
    font-size: 11px;
}

/* Compact sharded status badges - fixed 2-line height */
.status-badge.shard {
    padding: 4px 6px;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 2px 0;
    border-radius: 4px;
    height: 38px; /* Fixed height for exactly 2 lines */
    min-height: 38px;
    max-height: 38px;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
}

.status-badge.shard .shard-line {
    font-weight: 600;
    font-size: 11px;
}

.status-badge.shard .duration-line {
    font-size: 9px;
    opacity: 0.9;
    font-weight: normal;
}

/* Status badge duration - uses the same badge styles as main dashboard */
.status-badge small {
    display: block;
    margin-top: 1px;
    font-weight: normal;
    line-height: 1.1;
    font-size: 9px;
}

/* Clean time info display in status badges */
.status-badge .time-info {
    display: block;
    font-size: 10px;
    font-weight: 500;
    opacity: 0.95;
    margin-top: 2px;
    line-height: 1.3;
    letter-spacing: 0.3px;
}


/* ========================================
   Releases Tab - Badge Sizing with Queue Times
   ======================================== */

/* Status badges in Releases tab (Linux/Windows packages) - consistent sizing */
#releases-tab .status-badge {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
    height: 50px;
    min-height: 50px;
    border-radius: 8px;
    box-sizing: border-box;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4px 6px;
}

/* Time info display in releases tab */
#releases-tab .status-badge .time-info {
    font-size: 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 85px;
    line-height: 1.2;
    margin-top: 2px;
}

#releases-tab .status-badge .queue-indicator {
    font-size: 7px;
    padding: 0 2px;
    margin-left: 2px;
    opacity: 0.85;
}

/* PyTorch tables in Releases tab - fixed consistent badge sizes */
#releases-tab .pytorch-table .status-badge {
    width: 75px !important;
    min-width: 75px !important;
    max-width: 75px !important;
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 6px !important;
    font-size: 0.8rem;
    padding: 3px 4px;
}

#releases-tab .pytorch-table .status-badge .time-info {
    font-size: 8px;
    margin-top: 2px;
    line-height: 1.2;
    max-width: 70px;
}

#releases-tab .pytorch-table .status-badge .queue-indicator {
    font-size: 7px;
    opacity: 0.9;
}

/* PyTorch table cell alignment */
#releases-tab .pytorch-table td {
    text-align: center !important;
    vertical-align: middle !important;
    padding: 4px 2px;
}

/* ========================================
   CI Nightly Tab - Consistent Badge Sizing
   ======================================== */

/* ALL status badges in CI Nightly - same fixed width, height, and border-radius */
#ci-nightly-tab .status-badge,
#ci-nightly-tab .status-badge.shard {
    width: 90px !important;
    min-width: 90px !important;
    max-width: 90px !important;
    height: 50px !important;
    min-height: 50px !important;
    border-radius: 8px !important;
    box-sizing: border-box;
    display: inline-flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Shard container layout */
#ci-nightly-tab .shard-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    align-items: center;
}

#ci-nightly-tab .shard-badge {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Table cells - center content both ways */
#ci-nightly-tab .status-table td,
#ci-nightly-tab .pytorch-table td {
    text-align: center !important;
    vertical-align: middle !important;
    padding: 8px 4px;
}

/* Compact text to fit in fixed size */
#ci-nightly-tab .status-badge .time-info {
    font-size: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 85px;
    line-height: 1.2;
}

#ci-nightly-tab .status-badge .queue-indicator {
    font-size: 6px;
    padding: 0 2px;
    margin-left: 1px;
}

/* Architecture column - left aligned with proper spacing for arrow */
#ci-nightly-tab .status-table td:first-child,
#ci-nightly-tab .pytorch-table td:first-child {
    text-align: left !important;
    padding-left: 24px !important;
    position: relative;
}

/* ========================================
   Build Info Panel Styles
   ======================================== */

.build-info-panel {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
}

.build-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.build-info-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.build-info-badges {
    display: flex;
    align-items: center;
    gap: 10px;
}

.build-info-version {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4b5563;
    font-family: 'Consolas', 'Monaco', monospace;
}

.release-type-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.release-type-badge.nightly {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    color: white;
}

.release-type-badge.dev {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: white;
}

.release-type-badge.prerelease {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    color: white;
}

/* Workflow Runs Grid */
.workflow-runs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.workflow-run-card {
    background: var(--bg-elevated);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 12px;
    transition: all 0.2s ease;
}

.workflow-run-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    border-color: var(--primary);
}

.workflow-run-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.workflow-icon {
    font-size: 1.1rem;
}

.workflow-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.workflow-run-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.workflow-run-link {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.workflow-run-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.workflow-run-sha {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: 'Consolas', 'Monaco', monospace;
}

.workflow-run-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Build Download Section */
.build-download-section {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(139, 92, 246, 0.2);
}

.build-info-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.build-info-value {
    font-size: 0.9rem;
    color: #1f2937;
    font-weight: 500;
    word-break: break-all;
}

.build-info-link {
    color: #6366f1;
    text-decoration: none;
    transition: color 0.2s;
}

.build-info-link:hover {
    color: #818cf8;
    text-decoration: underline;
}

/* Download Links in Tables */
.download-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.download-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.download-link.tarball {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.download-link.tarball:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.25));
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.2);
}

.download-link .icon {
    font-size: 0.85rem;
}

/* Download Button Group */
.download-btn-group {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: none;
    min-width: 80px;
    min-height: 32px;
    letter-spacing: 0.3px;
    color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.download-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.download-btn .dl-icon {
    font-size: 0.8rem;
}

.download-btn.dl-tarball {
    background: linear-gradient(135deg, #059669 0%, #34d399 100%);
    box-shadow: 0 3px 8px rgba(5, 150, 105, 0.3);
}
.download-btn.dl-tarball:hover {
    box-shadow: 0 5px 15px rgba(5, 150, 105, 0.4);
}

.download-btn.dl-wheels {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    box-shadow: 0 3px 8px rgba(99, 102, 241, 0.3);
}
.download-btn.dl-wheels:hover {
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

.download-btn.dl-deb {
    background: linear-gradient(135deg, #db2777 0%, #f472b6 100%);
    box-shadow: 0 3px 8px rgba(219, 39, 119, 0.3);
}
.download-btn.dl-deb:hover {
    box-shadow: 0 5px 15px rgba(219, 39, 119, 0.4);
}

.download-btn.dl-rpm {
    background: linear-gradient(135deg, #d97706 0%, #fbbf24 100%);
    box-shadow: 0 3px 8px rgba(217, 119, 6, 0.3);
}
.download-btn.dl-rpm:hover {
    box-shadow: 0 5px 15px rgba(217, 119, 6, 0.4);
}

.download-btn.dl-staging {
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    box-shadow: 0 3px 8px rgba(124, 58, 237, 0.3);
}
.download-btn.dl-staging:hover {
    box-shadow: 0 5px 15px rgba(124, 58, 237, 0.4);
}

/* No Download Available */
.no-download {
    color: #9ca3af;
    font-size: 0.8rem;
    font-style: italic;
}

/* Responsive adjustments for build info */
@media (max-width: 768px) {
    .build-info-panel {
        padding: 15px;
    }

    .build-info-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .build-info-grid {
        grid-template-columns: 1fr;
    }

    .download-links {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* ========================================
   Submodule PRs Tab Styles
   ======================================== */

/* PR Count Badge */
.pr-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.85rem;
    background: #e5e7eb;
    color: #6b7280;
    transition: all 0.2s ease;
}

.pr-count.has-prs {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Repository Link */
.repo-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #6366f1;
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.repo-link:hover {
    color: #818cf8;
    text-decoration: underline;
}

/* PR Link */
.pr-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #6366f1;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pr-link:hover {
    color: #818cf8;
}

/* PR Title Cell */
.pr-title {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.85rem;
    color: #374151;
}

/* Author Badge */
.author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    font-size: 0.8rem;
    color: #4b5563;
    font-weight: 500;
}

.author:before {
    content: '👤';
    font-size: 0.75rem;
}

/* Submodule PRs Table specific styles */
#submodule-prs-table td,
#pr-activity-table td {
    vertical-align: middle;
}

#submodule-prs-table .status-badge,
#pr-activity-table .status-badge {
    min-width: 80px;
    font-size: 0.7rem;
    padding: 6px 10px;
    min-height: 28px;
}

/* CI Checks Badge - Compact version */
#pr-activity-table .status-badge {
    font-size: 0.75rem;
    min-width: 60px;
}

/* ========================================
   Bump PRs Tab Specific Styles
   ======================================== */

/* SHA Code Display */
.sha-code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.8rem;
    padding: 3px 8px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 4px;
    color: #4b5563;
    letter-spacing: 0.5px;
}

/* Path Code Display */
.path-code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.75rem;
    padding: 2px 6px;
    background: rgba(107, 114, 128, 0.1);
    border-radius: 4px;
    color: #6b7280;
}

/* Submodule Name Link */
.submodule-name-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 600;
}

.submodule-name-link:hover {
    color: var(--primary);
}

/* SHA Link */
.sha-link {
    text-decoration: none;
}

.sha-link:hover .sha-code {
    background: rgba(99, 102, 241, 0.2);
    color: #6366f1;
}

/* Commits Behind Badge */
.commits-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 80px;
}

.commits-badge.current {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.commits-badge.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.15));
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.commits-badge.stale {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.15));
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.commits-badge.unknown {
    background: #e5e7eb;
    color: #6b7280;
}

/* Age Badge */
.age-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.age-badge.current {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.age-badge.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.age-badge.stale {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

/* No PR Indicator */
.no-pr {
    color: #9ca3af;
    font-style: italic;
}

/* Bump PRs Table Styles */
#open-bump-prs-table td,
#submodule-status-table td,
#merged-bump-prs-table td {
    vertical-align: middle;
}

#bump-prs-tab .status-badge {
    min-width: 70px;
    font-size: 0.7rem;
    padding: 5px 8px;
    min-height: 26px;
}

/* ========================================
   Issues Tab Styles
   ======================================== */

/* Issue Stats in Header */
.issue-stats {
    display: flex;
    gap: 15px;
    align-items: center;
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e5e7eb;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-item span {
    font-weight: 700;
    font-size: 1rem;
}

.stat-item.open span {
    color: #60a5fa;
}

.stat-item.resolved span {
    color: #34d399;
}

/* Add Issue Button */
.add-issue-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.add-issue-btn:hover {
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4) !important;
}

/* Issues Filters */
.issues-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: var(--card-shadow);
    align-items: flex-end;
}

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

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

.filter-group select,
.filter-group input {
    padding: 10px 14px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-elevated);
    background: #18181b;
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-group select:hover,
.filter-group input:hover {
    border-color: #6366f1;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.search-group {
    flex: 1;
    min-width: 200px;
}

/* Date Filter */
.date-filter-group {
    min-width: auto;
}

.date-filter-wrapper {
    display: flex;
    align-items: stretch;
    background: #18181b;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.date-filter-wrapper:hover {
    border-color: #6366f1;
}

.date-filter-wrapper:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.date-field-select {
    padding: 8px 10px;
    border: none;
    border-right: 1px solid var(--card-border);
    background: rgba(99, 102, 241, 0.08);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    min-width: 105px;
    outline: none;
}

.date-range-inputs {
    display: flex;
    align-items: center;
    gap: 0;
}

.date-input-box {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
}

.date-input-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    white-space: nowrap;
    opacity: 0.7;
}

.date-input-box input {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    padding: 8px 2px;
    cursor: pointer;
    outline: none;
    width: 115px;
}

.date-input-box input.has-value {
    color: var(--text-primary);
    font-weight: 500;
}

.date-input-box input::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
    font-style: italic;
}

.date-input-box input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.6);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.date-input-box input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.date-range-arrow {
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.5;
    flex-shrink: 0;
}

.date-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: none;
    border-left: 1px solid var(--card-border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.5;
}

.date-clear-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    opacity: 1;
}

/* Multi-select Label Filter */
.label-filter-group {
    min-width: 200px;
}

.multi-select-container {
    position: relative;
    min-width: 200px;
}

.multi-select-btn {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--card-border);
    border-radius: 10px;
    font-size: 0.9rem;
    background: var(--bg-elevated);
    color: var(--text-primary);
    color: #1f2937;
    background: #18181b;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    align-items: center;
    transition: all 0.2s ease;
}

.multi-select-btn:hover {
    border-color: #6366f1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

.multi-select-btn:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.multi-select-btn .dropdown-arrow {
    font-size: 0.65rem;
    color: #9ca3af;
    transition: transform 0.2s ease;
    margin-left: 8px;
}

.multi-select-btn.open .dropdown-arrow {
    transform: rotate(180deg);
}

.multi-select-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 280px;
    background: var(--bg-elevated);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-height: 400px;
    overflow: hidden;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.multi-select-dropdown.hidden {
    display: none;
}

.label-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--card-border);
    background: var(--bg-surface);
}

.label-dropdown-header .match-mode {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #6366f1;
    cursor: pointer;
    font-weight: 500;
}

.label-dropdown-header .match-mode input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #6366f1;
}

.clear-labels-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6366f1;
    background: #18181b;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.clear-labels-btn:hover {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

.label-options {
    overflow-y: auto;
    max-height: 320px;
    padding: 8px;
}

.label-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: 8px;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.label-option:hover {
    background: var(--bg-overlay);
}

.label-option:has(input:checked) {
    background: var(--primary-bg);
    border: 1px solid var(--primary);
    margin: -1px;
    margin-bottom: 1px;
}

.label-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #6366f1;
    border-radius: 4px;
    flex-shrink: 0;
}

.label-option .label-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.label-option .label-name {
    font-size: 0.875rem;
    color: var(--text-primary);
    flex: 1;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.label-option .label-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-light);
    background: var(--bg-overlay);
    padding: 3px 8px;
    border-radius: 12px;
    min-width: 28px;
    text-align: center;
}

/* Selected Labels Tags */
.selected-labels-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.selected-labels-tags:empty {
    display: none;
}

.label-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    font-size: 0.8rem;
    font-weight: 500;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: #4338ca;
    border-radius: 20px;
    border: 1px solid #c7d2fe;
    box-shadow: 0 1px 3px rgba(99, 102, 241, 0.1);
    transition: all 0.15s ease;
}

.label-tag:hover {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.2);
}

.label-tag .tag-color {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.label-tag .remove-tag {
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    color: #6366f1;
    opacity: 0.6;
    transition: all 0.15s ease;
    margin-left: 2px;
}

.label-tag .remove-tag:hover {
    opacity: 1;
    color: #dc2626;
}

.label-tag .remove-tag:hover {
    opacity: 1;
}

.search-group input {
    width: 100%;
}

/* Issues Table */
.issues-table {
    width: 100%;
    table-layout: fixed;
}

.issues-table th {
    background: var(--table-header-bg);
    font-size: var(--font-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--table-header-text);
    padding: var(--spacing-md) var(--spacing-sm);
    white-space: nowrap;
    overflow: hidden;
    border: none;
    border-bottom: 1px solid var(--gray-400);
}

.issues-table td {
    padding: 10px 6px;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}

.issues-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}

.issues-table tbody tr:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04) 0%, rgba(139, 92, 246, 0.04) 100%);
}

/* Issue ID */
.issue-id {
    font-family: 'Consolas', 'Monaco', monospace;
    font-weight: 700;
    color: #6366f1;
    font-size: 0.85rem;
}

/* Issue Title */
.issue-title-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.issue-title-text {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.85rem;
    line-height: 1.25;
    cursor: pointer;
    transition: color 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.issue-title-text:hover {
    color: #6366f1;
}

.issue-description-preview {
    font-size: 0.7rem;
    color: #9ca3af;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

/* Priority Badge */
.priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 60px;
}

.priority-badge.critical {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: white;
    animation: pulse-critical 2s infinite;
}

.priority-badge.high {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    color: white;
}

.priority-badge.medium {
    background: linear-gradient(135deg, #eab308 0%, #facc15 100%);
    color: #422006;
}

.priority-badge.low {
    background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
    color: white;
}

.priority-badge.none {
    background: #f3f4f6;
    color: #9ca3af;
    font-weight: 500;
}

@keyframes pulse-critical {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* Issue Labels */
.issue-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    max-width: 100%;
    overflow: hidden;
}

.issue-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
}

.issue-label.monitoring {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.issue-label.build-failure {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.15));
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.issue-label.test-failure {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(139, 92, 246, 0.15));
    color: #7c3aed;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.issue-label.performance {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.15));
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.issue-label.bug {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(248, 113, 113, 0.1));
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.issue-label.feature {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(52, 211, 153, 0.15));
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.issue-label.manual {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.15), rgba(156, 163, 175, 0.15));
    color: #4b5563;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

/* GitHub Label Badge - uses actual GitHub colors */
.github-label {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    margin: 2px;
}

.more-labels {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    background: #e5e7eb;
    color: #6b7280;
    margin: 2px;
}

/* Issue Author */
.issue-author {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #4b5563;
    overflow: hidden;
}

.issue-author span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.author-avatar {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
}

/* Comments count */
.comments-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 10px;
    background: rgba(107, 114, 128, 0.1);
    border: 1px solid rgba(107, 114, 128, 0.15);
    border-radius: 8px;
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
    height: 32px;
    white-space: nowrap;
}

/* Issue Source */
.issue-source {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
}

.issue-source.monitoring {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.issue-source.manual {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

/* Issue Date */
.issue-date {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Issue Actions */
.issue-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    flex-wrap: nowrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.action-btn.edit {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.action-btn.edit:hover {
    background: #6366f1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.action-btn.delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.action-btn.delete:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.action-btn.view {
    background: var(--primary);
    color: white;
    width: auto;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 500;
}

.action-btn.view:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.action-btn.link {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    text-decoration: none;
}

.action-btn.link:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: #18181b;
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease;
}

.modal-small {
    max-width: 400px;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 20px 20px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: all 0.2s;
    border-radius: 8px;
}

.modal-close:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 25px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0 0 20px 20px;
}

/* Form Styles */
#issue-form {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #1f2937;
    background: #18181b;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Labels Checkboxes */
.labels-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.label-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4b5563;
    transition: all 0.2s ease;
}

.label-checkbox:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

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

.label-checkbox input[type="checkbox"]:checked + span,
.label-checkbox:has(input:checked) {
    color: #6366f1;
}

.label-checkbox:has(input:checked) {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
}

/* Delete Modal */
.delete-issue-title {
    padding: 12px 16px;
    background: #f3f4f6;
    border-radius: 8px;
    font-weight: 600;
    color: #1f2937;
    margin: 15px 0;
}

/* Status Badge for Issues Tab */
#issues-tab .status-badge {
    min-width: 85px;
    font-size: 0.7rem;
    padding: 6px 10px;
    min-height: 28px;
}

#issues-tab .status-badge.resolved {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

/* Responsive Styles for Issues Tab */
@media (max-width: 768px) {
    .issues-filters {
        flex-direction: column;
        gap: 12px;
    }

    .filter-group {
        min-width: 100%;
    }

    .date-filter-wrapper {
        flex-wrap: wrap;
    }

    .date-field-select {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--card-border);
    }

    .date-range-inputs {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 10px;
        max-height: 95vh;
    }

    .issue-actions {
        flex-direction: column;
        gap: 4px;
    }

    .action-btn {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .issue-stats {
        flex-wrap: wrap;
        gap: 8px;
    }

    .stat-item {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
}

/* ========================================
   Issues Report / Aggregated Dashboard
   ======================================== */

.issues-report {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
}

.report-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 700;
}

.report-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.report-controls select {
    padding: 8px 14px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-primary);
    background: var(--bg-elevated);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.report-controls select:hover {
    border-color: #6366f1;
}

.report-controls select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.report-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Report Summary Cards */
.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.report-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--card-border);
}

.report-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.report-card .card-icon {
    font-size: 2rem;
    line-height: 1;
}

.report-card .card-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.report-card .card-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

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

.report-card.summary {
    border-color: rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), var(--card-bg));
}

.report-card.summary .card-value {
    color: var(--primary-light);
}

.report-card.open {
    border-color: rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), var(--card-bg));
}

.report-card.open .card-value {
    color: var(--running);
}

.report-card.closed {
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), var(--card-bg));
}

.report-card.closed .card-value {
    color: var(--success);
}

.report-card.rate {
    border-color: rgba(168, 85, 247, 0.3);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), var(--card-bg));
}

.report-card.rate .card-value {
    color: var(--text-secondary);
}

/* Report Breakdown Section */
.report-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.breakdown-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.breakdown-section h4 {
    margin: 0 0 15px 0;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Priority Breakdown Bars */
.breakdown-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.breakdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.breakdown-label {
    width: 60px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
}

.breakdown-bar-container {
    flex: 1;
    height: 10px;
    background: #f3f4f6;
    border-radius: 5px;
    overflow: hidden;
}

.breakdown-bar {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.breakdown-bar.critical {
    background: linear-gradient(90deg, #dc2626, #ef4444);
}

.breakdown-bar.high {
    background: linear-gradient(90deg, #f97316, #fb923c);
}

.breakdown-bar.medium {
    background: linear-gradient(90deg, #eab308, #facc15);
}

.breakdown-bar.low {
    background: linear-gradient(90deg, #6b7280, #9ca3af);
}

.breakdown-count {
    width: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
    text-align: right;
}

/* Top Labels */
.top-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Top label styling (used in Issues Report) */
.top-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-elevated);
    color: var(--text-primary) !important;
    border: 1px solid var(--card-border);
    transition: transform 0.2s ease;
}

.top-label:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}

.top-label .count {
    background: var(--primary);
    color: white !important;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-left: 4px;
}

[data-theme="light"] .top-label {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b !important;
}

[data-theme="light"] .top-label .count {
    background: #4f46e5;
    color: white !important;
}

.top-label-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: transform 0.2s ease;
    background: var(--bg-overlay);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.top-label-item:hover {
    transform: scale(1.05);
}

.top-label-count {
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
}

.top-label-placeholder,
.top-contributor-placeholder {
    color: #9ca3af;
    font-style: italic;
    font-size: 0.85rem;
}

/* Top Contributors */
.top-contributors {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.contributor-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-overlay);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.contributor-item:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.contributor-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--card-border);
}

.contributor-count {
    background: var(--primary-bg);
    color: var(--primary-light);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* ========================================
   Sortable Table Headers
   ======================================== */

.issues-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: all 0.2s ease;
}

.issues-table th.sortable:hover {
    background: var(--table-header-hover);
}

.issues-table th.sortable .sort-icon {
    font-size: 0.7rem;
    opacity: 0.5;
    margin-left: 4px;
    transition: all 0.2s ease;
    color: white;
}

.issues-table th.sortable:hover .sort-icon {
    opacity: 0.8;
}

.issues-table th.sortable.sort-asc .sort-icon,
.issues-table th.sortable.sort-desc .sort-icon {
    opacity: 1;
    color: #a5b4fc;
}

.issues-table th.sortable.sort-asc .sort-icon::after {
    content: '↑';
}

.issues-table th.sortable.sort-desc .sort-icon::after {
    content: '↓';
}

.issues-table th.sortable.sort-asc .sort-icon,
.issues-table th.sortable.sort-desc .sort-icon {
    font-size: 0;
}

.issues-table th.sortable.sort-asc .sort-icon::after,
.issues-table th.sortable.sort-desc .sort-icon::after {
    font-size: 0.8rem;
}

/* Assignee Column Styles */
.issue-assignee {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #4b5563;
}

.issue-assignee .assignee-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
}

.issue-assignee.unassigned {
    color: #9ca3af;
    font-style: italic;
}

.multi-assignees {
    display: flex;
    align-items: center;
}

.multi-assignees .assignee-avatar {
    margin-left: -8px;
    border: 2px solid white;
}

.multi-assignees .assignee-avatar:first-child {
    margin-left: 0;
}

.multi-assignees .more-assignees {
    margin-left: 4px;
    font-size: 0.7rem;
    color: #6b7280;
    font-weight: 600;
}

/* Responsive for Report */
@media (max-width: 768px) {
    .issues-report {
        padding: 15px;
    }

    .report-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .report-card {
        padding: 12px 15px;
    }

    .report-card .card-icon {
        font-size: 1.5rem;
    }

    .report-card .card-value {
        font-size: 1.4rem;
    }

    .report-breakdown {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Issues Pagination Controls
   ======================================== */

.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.pagination-info span {
    font-weight: 700;
    color: var(--primary);
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--card-border);
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #818cf8;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

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

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 8px;
}

.pagination-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--card-border);
    background: var(--bg-surface);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: #818cf8;
    transition: all 0.2s ease;
}

.pagination-page:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination-page.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

.pagination-ellipsis {
    color: var(--text-muted);
    padding: 0 4px;
}

.pagination-size {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.pagination-size select {
    padding: 6px 10px;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
}

.pagination-size select:focus {
    outline: none;
    border-color: #6366f1;
}

@media (max-width: 768px) {
    .pagination-controls {
        flex-direction: column;
        gap: 10px;
    }

    .pagination-buttons {
        order: -1;
    }
}

/* ============= CI HUD Tab Styles ============= */
.ci-hud-stats {
    display: flex;
    gap: 15px;
}

.ci-hud-stats .stat-item {
    font-size: 0.9rem;
    font-weight: 500;
}

.ci-hud-stats .stat-item.all-pass {
    color: #10b981;
}

.ci-hud-stats .stat-item.failing {
    color: #ef4444;
}

.ci-hud-stats .stat-item.running {
    color: #f59e0b;
}

.ci-hud-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-elevated);
    border-radius: 10px;
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
}

.ci-hud-container {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    overflow-x: auto;
    max-width: 100%;
}

/* Main CI HUD table (shares structure with repo CI HUD) */
.ci-hud-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.ci-hud-table thead {
    background: var(--card-bg);
}
.ci-hud-table thead th {
    background: var(--card-bg);
    padding: 12px 14px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--card-border);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
}

.ci-hud-table thead th.sticky-col,
.ci-hud-table tbody td.sticky-col {
    box-sizing: border-box;
}
.ci-hud-table thead th.sticky-col {
    position: sticky;
    z-index: 3;
    background: var(--card-bg);
}
.ci-hud-table thead th.col-sha { left: 0; width: 80px; min-width: 80px; }
.ci-hud-table thead th.col-msg { left: 80px; width: 220px; min-width: 220px; }
.ci-hud-table thead th.col-auth { left: 300px; width: 110px; min-width: 110px; }
.ci-hud-table thead th.col-time { left: 410px; width: 80px; min-width: 80px; }

.ci-hud-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--card-border);
    vertical-align: middle;
}

.ci-hud-table tbody td.sticky-col {
    position: sticky;
    z-index: 1;
    background: var(--card-bg);
}
.ci-hud-table tbody td.col-sha { left: 0; width: 80px; min-width: 80px; }
.ci-hud-table tbody td.col-sha a {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.82rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.ci-hud-table tbody td.col-sha a:hover { text-decoration: underline; }
.ci-hud-table tbody td.col-msg {
    left: 80px; width: 220px; min-width: 220px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 0.78rem; color: var(--text-primary);
}
.ci-hud-table tbody td.col-auth {
    left: 300px; width: 110px; min-width: 110px;
    font-size: 0.75rem; white-space: nowrap;
}
.ci-hud-table tbody td.col-time {
    left: 410px; width: 80px; min-width: 80px;
}
.ci-hud-table thead th.col-time {
    box-shadow: 4px 0 8px -2px rgba(0, 0, 0, 0.3);
}
.ci-hud-table tbody td.col-time {
    box-shadow: 4px 0 8px -2px rgba(0, 0, 0, 0.15);
    font-size: 0.72rem; color: var(--text-muted); white-space: nowrap;
}
.ci-hud-table tbody td.col-auth img.author-avatar {
    width: 18px; height: 18px; border-radius: 50%; vertical-align: middle; margin-right: 4px;
}
.ci-hud-table tbody td.col-cat {
    text-align: center; white-space: nowrap;
}

.ci-hud-table .repo-ci-row { cursor: pointer; }
.ci-hud-table .repo-ci-row:hover td { background: var(--bg-overlay); }
.ci-hud-table .repo-ci-row:hover td.sticky-col { background: var(--bg-overlay); }
.ci-hud-table .repo-row-fail td { background: rgba(239, 68, 68, 0.04); }
.ci-hud-table .repo-row-fail:hover td { background: rgba(239, 68, 68, 0.07); }
.ci-hud-table .repo-row-run td { background: var(--warning-light); }
.ci-hud-table .ci-hud-row.expanded td { background: var(--bg-overlay); }
.ci-hud-table .ci-hud-row.expanded td.sticky-col { background: var(--bg-overlay); }

.ci-hud-table .repo-ci-expand-row td {
    background: var(--bg-elevated);
    padding: 16px 20px;
    border-bottom: 2px solid var(--card-border);
}


/* Status icons */
.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
}

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

.status-icon.failure {
    background: var(--danger-light);
    color: var(--danger);
}

.status-icon.running {
    background: var(--warning-light);
    color: var(--warning);
}

.status-icon.na {
    background: var(--bg-overlay);
    color: var(--text-muted);
}

/* Build list container */
.build-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Build status */
.build-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    white-space: nowrap;
    width: fit-content;
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    margin-right: 4px;
    margin-bottom: 3px;
    white-space: nowrap;
}

.build-status.success {
    background: var(--success-light);
    color: var(--success-dark);
}

.build-status.failure {
    background: var(--danger-light);
    color: var(--danger-dark);
}

.build-status.running {
    background: var(--warning-light);
    color: var(--warning);
}

.build-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 4px;
}

/* Test list container */
.test-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Test architecture badge */
.test-arch {
    font-size: 0.65rem;
    font-weight: 500;
    padding: 3px 6px;
    border-radius: 4px;
    white-space: nowrap;
    width: fit-content;
}

.test-arch.success {
    background: var(--success-light);
    color: var(--success-dark);
}

.test-arch.failure {
    background: var(--danger-light);
    color: var(--danger-dark);
}

.test-arch.running {
    background: var(--warning-light);
    color: var(--warning);
}

/* Test count (summary) */
.test-count {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

.test-count.success {
    background: #d1fae5;
    color: #059669;
}

.test-count.failure {
    background: #fee2e2;
    color: #dc2626;
}

.test-count.running {
    background: #fef3c7;
    color: #d97706;
}

/* CI HUD expanded detail content (inside expand row <td>) */
.ci-hud-table .repo-ci-expand-row .ci-hud-expanded-grid {
    max-width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
}

.ci-hud-expanded-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.expanded-section {
    background: var(--bg-elevated);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--card-border);
}

.expanded-section.full-width {
    grid-column: 1 / -1;
}

.expanded-section h4 {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    color: var(--text-primary);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--card-border);
}

.expanded-section h5 {
    margin: 10px 0 8px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.expanded-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.expanded-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.expanded-item.success {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.expanded-item.success:hover {
    background: #d1fae5;
}

.expanded-item.failure {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.expanded-item.failure:hover {
    background: #fee2e2;
}

.expanded-item.running {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.expanded-item.na {
    background: var(--bg-overlay);
    color: var(--text-muted);
    border: 1px solid var(--card-border);
}

.item-icon {
    font-weight: 700;
}

.test-arch-group {
    margin-bottom: 15px;
}

.test-arch-group:last-child {
    margin-bottom: 0;
}

.expanded-actions {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.expanded-actions .action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #6366f1;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    width: auto;
    height: auto;
    white-space: nowrap;
}

.expanded-actions .action-btn:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* CI HUD pagination */
.ci-hud-pagination {
    padding: 15px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* CI HUD loading/empty/error states */
.ci-hud-loading,
.ci-hud-empty,
.ci-hud-error {
    padding: 60px 20px;
    text-align: center;
    color: #6b7280;
    font-size: 1rem;
}

.ci-hud-error {
    color: #dc2626;
}

/* Responsive */
@media (max-width: 1200px) {
    .ci-hud-expanded-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .ci-hud-expanded-grid {
        grid-template-columns: 1fr;
    }
}

/* CI HUD Pagination Controls */
.ci-hud-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    margin-top: 15px;
}

.ci-hud-pagination-btns {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ci-hud-page-btn {
    padding: 8px 16px;
    border: 1px solid var(--card-border);
    background: var(--bg-surface);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s ease;
}

.ci-hud-page-btn:hover:not(:disabled) {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

.ci-hud-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ci-hud-page-nums {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ci-hud-page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border: 1px solid var(--card-border);
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s ease;
}

.ci-hud-page-num:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.ci-hud-page-num.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
    cursor: default;
}

span.ci-hud-page-num.active {
    cursor: default;
}

/* Refresh Button States */
.refresh-btn {
    position: relative;
    transition: all 0.2s ease;
}

.refresh-btn.refreshing {
    background: #818cf8 !important;
    cursor: wait;
}

.refresh-btn.refresh-success {
    background: #10b981 !important;
    border-color: #10b981 !important;
}

.refresh-btn.refresh-error {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
}

/* Custom Tooltip - Shows Below */
.refresh-btn::after {
    content: 'Re-fetch data (auto-updates every 5 min)';
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1e293b;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.refresh-btn::before {
    content: '';
    position: absolute;
    top: calc(100% + 2px);
    right: 16px;
    border: 6px solid transparent;
    border-bottom-color: #1e293b;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.refresh-btn:hover::after,
.refresh-btn:hover::before {
    opacity: 1;
    visibility: visible;
}

.refresh-btn.refreshing::after,
.refresh-btn.refreshing::before,
.refresh-btn.refresh-success::after,
.refresh-btn.refresh-success::before,
.refresh-btn.refresh-error::after,
.refresh-btn.refresh-error::before {
    display: none;
}

.export-excel-btn {
    background: #059669;
    color: #fff;
    border: 1px solid #047857;
    min-height: 40px;
    box-sizing: border-box;
}
.export-excel-btn:hover {
    background: #047857;
    box-shadow: 0 5px 15px rgba(5, 150, 105, 0.4);
}
/* Override Refresh tooltip for Export button - must win over .refresh-btn::after */
.refresh-btn.export-excel-btn::after {
    content: 'Download Release report as Excel (.xlsx)';
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1e293b;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.refresh-btn.export-excel-btn:hover::after {
    opacity: 1;
    visibility: visible;
}
.refresh-btn.export-excel-btn::before {
    content: '';
    position: absolute;
    top: calc(100% + 2px);
    right: 16px;
    border: 6px solid transparent;
    border-bottom-color: #1e293b;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.refresh-btn.export-excel-btn:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   COMPREHENSIVE THEME OVERRIDES
   ======================================== */

/* Light Theme - Complete Override */
[data-theme="light"] {
    /* Form elements */
    --input-bg: #ffffff;
    --input-border: #d1d5db;
    --input-text: #1f2937;
}

[data-theme="light"] .version-dropdown,
[data-theme="light"] .ci-run-dropdown {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: #1f2937;
}

[data-theme="light"] .version-dropdown option,
[data-theme="light"] .ci-run-dropdown option {
    background: #ffffff;
    color: #1f2937;
}

[data-theme="light"] .filter-group select,
[data-theme="light"] .filter-group input {
    background: #ffffff;
    border-color: #d1d5db;
    color: #1f2937;
}

[data-theme="light"] .date-filter-wrapper {
    background: #ffffff;
    border-color: #d1d5db;
}

[data-theme="light"] .date-field-select {
    background: rgba(99, 102, 241, 0.06);
    border-right-color: #d1d5db;
    color: #1f2937;
}

[data-theme="light"] .date-input-box input {
    color: #6b7280;
}

[data-theme="light"] .date-input-box input.has-value {
    color: #1f2937;
}

[data-theme="light"] .date-input-box input[type="date"]::-webkit-calendar-picker-indicator {
    filter: none;
    opacity: 0.5;
}

[data-theme="light"] .date-clear-btn {
    border-left-color: #d1d5db;
    color: #6b7280;
}

[data-theme="light"] .multi-select-btn {
    background: #ffffff;
    border-color: #d1d5db;
    color: #1f2937;
}

[data-theme="light"] .multi-select-dropdown {
    background: #ffffff;
    border-color: #e5e7eb;
}

[data-theme="light"] .label-dropdown-header {
    background: #f8fafc;
    border-color: #e5e7eb;
}

[data-theme="light"] .label-option {
    color: #374151;
}

[data-theme="light"] .label-option:hover {
    background: #f3f4f6;
}

[data-theme="light"] .label-option .label-name {
    color: #1e293b;
}

[data-theme="light"] .label-option .label-count {
    background: #e2e8f0;
    color: #4f46e5;
}

[data-theme="light"] .label-option:has(input:checked) {
    background: #eef2ff;
    border-color: #c7d2fe;
}

[data-theme="light"] .pagination-controls {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .pagination-info {
    color: #6b7280;
}

[data-theme="light"] .pagination-info span {
    color: #4f46e5;
}

[data-theme="light"] .pagination-page {
    background: #ffffff;
    border-color: #d1d5db;
    color: #374151;
}

[data-theme="light"] .pagination-page:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #ffffff;
}

[data-theme="light"] .pagination-page.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #ffffff;
}

[data-theme="light"] .pagination-size {
    color: #6b7280;
}

[data-theme="light"] .pagination-size select {
    background: #ffffff;
    border-color: #d1d5db;
    color: #1f2937;
}

/* CI HUD Light Theme Fixes */
[data-theme="light"] .ci-hud-container {
    background: #ffffff;
    border-color: #e5e7eb;
}

[data-theme="light"] .ci-hud-filters {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .ci-hud-table thead th {
    background: #f8fafc;
    color: #475569;
    border-bottom-color: #e2e8f0;
}
[data-theme="light"] .ci-hud-table thead th.sticky-col {
    background: #f8fafc;
}
[data-theme="light"] .ci-hud-table tbody td.sticky-col {
    background: #fff;
}
[data-theme="light"] .ci-hud-table .repo-ci-row:hover td.sticky-col {
    background: #f1f5f9;
}
[data-theme="light"] .ci-hud-table tbody td {
    border-bottom-color: #e2e8f0;
}
[data-theme="light"] .ci-hud-table .repo-ci-expand-row td {
    background: #f8fafc;
    border-bottom-color: #e2e8f0;
}
[data-theme="light"] .ci-hud-table .repo-row-fail td {
    background: rgba(220, 38, 38, 0.04);
}
[data-theme="light"] .ci-hud-table .repo-row-fail:hover td {
    background: rgba(220, 38, 38, 0.07);
}

[data-theme="light"] .expanded-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .expanded-section h4 {
    color: #1f2937;
    border-bottom-color: #e5e7eb;
}

[data-theme="light"] .expanded-section h5 {
    color: #4b5563;
}



[data-theme="light"] .col-time {
    color: #6b7280;
}

/* Status icons in light mode */
[data-theme="light"] .status-icon.success {
    background: #dcfce7;
    color: #16a34a;
}

[data-theme="light"] .status-icon.failure {
    background: #fee2e2;
    color: #dc2626;
}

[data-theme="light"] .status-icon.running {
    background: #fef3c7;
    color: #d97706;
}

[data-theme="light"] .status-icon.na {
    background: #f3f4f6;
    color: #6b7280;
}

/* Build status in light mode */
[data-theme="light"] .build-status.success {
    background: #dcfce7;
    color: #16a34a;
}

[data-theme="light"] .build-status.failure {
    background: #fee2e2;
    color: #dc2626;
}

[data-theme="light"] .build-status.running {
    background: #fef3c7;
    color: #d97706;
}

/* Issues Report Light Theme */
[data-theme="light"] .issues-report {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    border-color: rgba(139, 92, 246, 0.15);
}

[data-theme="light"] .report-card {
    background: #ffffff;
    border-color: #e5e7eb;
}

[data-theme="light"] .report-card.summary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), #ffffff);
}

[data-theme="light"] .report-card.open {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), #ffffff);
}

[data-theme="light"] .report-card.closed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), #ffffff);
}

[data-theme="light"] .report-card.rate {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.05), #ffffff);
}

[data-theme="light"] .report-card .card-value {
    color: #1f2937;
}

[data-theme="light"] .report-card .card-label {
    color: #6b7280;
}

[data-theme="light"] .breakdown-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

[data-theme="light"] .breakdown-section h4 {
    color: #374151;
}

[data-theme="light"] .issues-filters {
    background: #ffffff;
    border-color: #e5e7eb;
}

/* Issue stats light theme */
[data-theme="light"] .stat-item {
    background: #e2e8f0;
    color: #475569;
    border: 1px solid #cbd5e1;
}

[data-theme="light"] .stat-item span {
    color: #1e293b;
}

[data-theme="light"] .stat-item.open span {
    color: #2563eb;
}

[data-theme="light"] .stat-item.resolved span {
    color: #059669;
}

[data-theme="light"] .top-label-item {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #374151;
}

[data-theme="light"] .contributor-item {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #4b5563;
}

/* Form Elements Light Theme */
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea,
[data-theme="light"] .form-group select {
    background: #ffffff;
    border-color: #d1d5db;
    color: #1f2937;
}

[data-theme="light"] .report-controls select {
    background: #ffffff;
    border-color: #d1d5db;
    color: #374151;
}

/* Legend Dark Theme */
[data-theme="dark"] .legend,
[data-theme="dark"] .legend-section,
:root .legend,
:root .legend-section {
    background: #1f1f23;
    border-color: #3f3f46;
}

[data-theme="dark"] .legend h3,
[data-theme="dark"] .legend-section h4,
:root .legend h3,
:root .legend-section h4 {
    color: #e4e4e7 !important;
}

[data-theme="dark"] .legend-item,
:root .legend-item {
    color: #a1a1aa !important;
}

/* Legend Light Theme */
[data-theme="light"] .legend,
[data-theme="light"] .legend-section {
    background: #ffffff;
    border-color: #cbd5e1;
}

[data-theme="light"] .legend h3,
[data-theme="light"] .legend-section h4 {
    color: #1e293b !important;
}

[data-theme="light"] .legend-item {
    color: #334155 !important;
}

/* Table Light Theme */
[data-theme="light"] table {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

[data-theme="light"] th {
    background: #f1f5f9;
    border-bottom: 2px solid #e2e8f0;
    color: #374151;
    border-color: #e5e7eb;
}

[data-theme="light"] td {
    color: #374151;
    border-color: #e5e7eb;
}

[data-theme="light"] tr:hover {
    background: #f8fafc;
}

/* Issues Table Light Theme */
[data-theme="light"] .issues-table th {
    background: #f8fafc;
    color: #374151;
}

[data-theme="light"] .issues-table td {
    color: #374151;
}


/* GPU Architecture column - ensure visibility in both themes */
[data-theme="dark"] .status-table td:first-child,
[data-theme="dark"] .pytorch-table td:first-child,
:root .status-table td:first-child,
:root .pytorch-table td:first-child {
    color: #e4e4e7 !important;
}

[data-theme="light"] .status-table td:first-child,
[data-theme="light"] .pytorch-table td:first-child {
    color: #1f2937 !important;
}

/* Submodule name visibility in dark mode */
[data-theme="dark"] .submodule-name-link,
:root .submodule-name-link {
    color: #e4e4e7 !important;
}

[data-theme="dark"] .submodule-name-link:hover,
:root .submodule-name-link:hover {
    color: #818cf8 !important;
}

[data-theme="light"] .submodule-name-link {
    color: #1f2937 !important;
}

[data-theme="light"] .submodule-name-link:hover {
    color: #4f46e5 !important;
}


/* Ensure dropdown arrows are visible */
[data-theme="light"] .multi-select-btn .dropdown-arrow {
    color: #6b7280;
}

/* Pagination buttons light theme */
[data-theme="light"] .pagination-btn {
    background: #ffffff;
    border-color: #d1d5db;
    color: #374151;
}

[data-theme="light"] .pagination-btn:hover {
    background: #f3f4f6;
    border-color: var(--primary);
}

[data-theme="light"] .pagination-btn.active {
    background: var(--primary);
    color: #ffffff;
}

/* Dark mode text fixes for stat cards */
[data-theme="dark"] .report-card.summary .card-value {
    color: #818cf8;
}

[data-theme="dark"] .report-card.open .card-value {
    color: #60a5fa;
}

[data-theme="dark"] .report-card.closed .card-value {
    color: #4ade80;
}

[data-theme="dark"] .report-card.rate .card-value {
    color: #a1a1aa;
}

/* ========================================
   ADDITIONAL THEME FIXES
   ======================================== */

/* Light Theme - Better shades and text visibility */
[data-theme="light"] body {
    background: #f1f5f9;
}

[data-theme="light"] .global-header {
    background: #e2e8f0;
    border-bottom: 1px solid #cbd5e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .global-header .site-title {
    color: #1e293b;
}

[data-theme="light"] .global-header .header-link {
    color: #475569;
    background: #ffffff;
    border-color: #cbd5e1;
}

[data-theme="light"] .global-header .header-link:hover {
    background: #f8fafc;
    border-color: #6366f1;
    color: #4f46e5;
}

[data-theme="light"] .container {
    background: transparent;
}

[data-theme="light"] .dashboard-section {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .dashboard-section h2,
[data-theme="light"] .dashboard-section h3,
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3 {
    color: #0f172a !important;
}

[data-theme="light"] .build-info-header h3 {
    color: #0f172a !important;
}

[data-theme="light"] .report-header h3 {
    color: #0f172a !important;
}

[data-theme="light"] p {
    color: #334155;
}

[data-theme="light"] .tab-navigation {
    background: #f8fafc;
    border-color: #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .tab-button {
    color: #475569;
}

[data-theme="light"] .tab-button:hover {
    background: #e2e8f0;
    color: #0f172a;
}

[data-theme="light"] .tab-button.active {
    background: #4f46e5;
    color: #ffffff !important;
}

[data-theme="light"] .ci-hud-pagination {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .ci-hud-page-btn {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #1e293b;
}

[data-theme="light"] .ci-hud-page-btn:hover {
    background: #f1f5f9;
    border-color: #4f46e5;
}

[data-theme="light"] .ci-hud-page-btn.active {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
}

/* Light theme pagination page numbers */
[data-theme="light"] .ci-hud-page-num {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #1e293b;
}

[data-theme="light"] .ci-hud-page-num:hover {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
}

[data-theme="light"] .ci-hud-page-num.active {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
}

/* Workflow run cards - Light theme */
[data-theme="light"] .workflow-run-card {
    background: #ffffff;
    border-color: #cbd5e1;
}

[data-theme="light"] .workflow-name {
    color: #1e293b;
}

[data-theme="light"] .workflow-run-sha {
    color: #64748b;
}

[data-theme="light"] .workflow-run-date {
    color: #475569;
}

[data-theme="light"] .issues-report {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.06), rgba(139, 92, 246, 0.06));
    border-color: #cbd5e1;
}

/* Dark Theme - Text visibility fixes */
[data-theme="dark"] .dashboard-section h2,
[data-theme="dark"] .dashboard-section h3,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
:root .dashboard-section h2,
:root .dashboard-section h3 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .build-info-header h3,
:root .build-info-header h3 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] p,
:root p {
    color: var(--text-secondary);
}


/* Action button text visibility */
[data-theme="light"] .action-btn.view {
    background: #4f46e5;
    color: #ffffff;
}
