/* PSPF Explorer 2025 theme extracted from inline styles on 2025-11-29 */

/* Utility classes */
.data-card--hidden {
    display: none;
}

/* Modern Dark Theme Design System Variables */
:root {
    --primary-gradient: linear-gradient(135deg, #5f7cd6 0%, #6f5aa3 100%);
    --primary-color: #6f88de;
    --primary-dark: #5d73c8;
    --primary-light: #b8c8ef;
    --secondary-color: #6f5aa3;
    --accent-color: #8172d8;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --danger-light: #fef2f2;
    --info-color: #3b82f6;

    --bg-primary: #212b3d;
    --bg-secondary: #111a2c;
    --bg-tertiary: #34435a;
    --bg-card: #1c2638;
    --bg-elevated: #28354a;
    --bg-light: #f8fafc;
    --bg-hover: #f1f5f9;

    --text-primary: #edf2fb;
    --text-secondary: #c8d3e6;
    --text-muted: #8b98ae;

    --border-light: #39485f;
    --border-medium: #4b5f7c;
    --border-dark: #6f82a1;
    --border-color: #e5e7eb;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.2);
    --shadow-md: 0 4px 8px -2px rgb(0 0 0 / 0.28), 0 2px 4px -2px rgb(0 0 0 / 0.2);
    --shadow-lg: 0 10px 16px -5px rgb(0 0 0 / 0.32), 0 4px 6px -5px rgb(0 0 0 / 0.2);
    --shadow-xl: 0 16px 24px -8px rgb(0 0 0 / 0.35), 0 8px 12px -10px rgb(0 0 0 / 0.24);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    --font-size-base: 1rem;
    --font-size-sm: 0.95rem;
    --font-size-xs: 0.875rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;

    /* Back-compat aliases used throughout the stylesheet */
    --font-size-large: var(--font-size-lg);

    /* Generic surface token used by some components */
    --surface-color: var(--bg-card);

    /* User-adjustable UI settings */
    --ui-font-scale: 1;
    --req-list-width: 380px;

    /* Dark chip color helpers */
    --chip-bg-success: rgba(16, 185, 129, 0.15);
    --chip-br-success: rgba(16, 185, 129, 0.35);
    --chip-bg-info: rgba(59, 130, 246, 0.15);
    --chip-br-info: rgba(59, 130, 246, 0.35);
    --chip-bg-warning: rgba(245, 158, 11, 0.15);
    --chip-br-warning: rgba(245, 158, 11, 0.35);
    --chip-bg-danger: rgba(239, 68, 68, 0.15);
    --chip-br-danger: rgba(239, 68, 68, 0.35);
    --chip-bg-orange: rgba(249, 115, 22, 0.15);
    --chip-br-orange: rgba(249, 115, 22, 0.35);
}

/* Global Styles */
* {
    box-sizing: border-box;
}

/* Skip link for keyboard navigation */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    z-index: 1001;
    text-decoration: none;
    font-weight: 500;
    border-radius: 0 0 var(--radius-md) 0;
    transition: top 0.3s ease;
}

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

/* Visually hidden but accessible to screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    padding: 0;
    font-size: calc(var(--font-size-base) * var(--ui-font-scale));
}

.site-notice {
    width: 100%;
    padding: 0.45rem 1rem;
    text-align: center;
    font-size: var(--font-size-xs);
    color: var(--warning-color);
    background: rgba(245, 158, 11, 0.12);
    border-bottom: 1px solid rgba(245, 158, 11, 0.35);
}

/* Typography hierarchy (keep "large" for emphasis only) */
h1 { font-size: var(--font-size-xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: var(--font-size-sm); }
.text-large { font-size: var(--font-size-xl); }

/* Header Enhancement */
.header {
    background: var(--primary-gradient);
    box-shadow: var(--shadow-lg);
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.logo {
    color: white;
    font-size: var(--font-size-large);
    font-weight: 700;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.logo::before {
    content: "🛡️ ";
    margin-right: 0.5rem;
}

.nav {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all 0.2s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-0.5px);
    box-shadow: var(--shadow-sm);
}

.nav-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.nav-btn:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Main Container */
.main {
    min-height: calc(100vh - 4rem);
    padding: 2rem 0;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Enhanced Breadcrumb */
.breadcrumb {
    display: none;
    background: var(--bg-card);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--primary-dark);
}

.breadcrumb .current {
    color: var(--text-secondary);
    font-weight: 600;
}

/* View Headers */
.view-header {
    text-align: center;
    margin-bottom: 3rem;
}

.view-header h2 {
    font-size: var(--font-size-large);
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.view, .tab-pane {
    animation: fadeIn 0.5s ease-in-out;
}

/* View visibility and utility helpers */
.view { display: none; }
.view.active { display: block; }
.hidden { display: none !important; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.subtitle {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Requirements Section 
 * Layout approach: Stay within .container bounds (max-width: 1440px) for predictable,
 * maintainable layout. The requirements section uses a 3-column grid:
 * - Column 1: Requirements list (user-adjustable via --req-list-width, default 380px)
 * - Column 2: Draggable splitter (10px)
 * - Column 3: Details pane (flexes to fill remaining space with 1fr)
 * 
 * This ensures the details pane always gets approximately 2/3 of the available width
 * while keeping the layout contained and responsive.
 */
.requirements-section {
    /* Stay within container bounds for predictable layout */
    width: 100%;
    box-sizing: border-box;
}

.requirements-layout {
    display: grid;
    /* Grid: Requirements list (~1/3), splitter (10px), Detail pane (~2/3) */
    /* Use var(--req-list-width) for user-adjustable width, but ensure detail pane gets remaining space */
    grid-template-columns: minmax(280px, var(--req-list-width)) 10px minmax(420px, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
    align-items: start;
}

.requirements-list {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-light);
    height: 82vh;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
}

.requirements-list-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-shrink: 0;
    margin-bottom: 0.75rem;
}

.requirements-list h4 {
    margin: 0;
    color: var(--text-primary);
    font-weight: 700;
}

.requirements-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.requirements-search {
    flex: 1;
    min-width: 12rem;
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    padding: 0.55rem 0.75rem;
    font-size: var(--font-size-sm);
}

.requirements-search:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.requirements-view-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
    padding: 0.9rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.65);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.requirements-view-panel.hidden {
    display: none;
}

.view-setting {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.view-setting label {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

.view-setting-inline {
    grid-column: 1 / -1;
}

.view-setting-inline label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.requirements-view-panel .btn-small {
    justify-self: start;
}

.form-control-sm {
    padding: 0.45rem 0.6rem;
    font-size: var(--font-size-sm);
}

.requirements-splitter {
    height: 82vh;
    max-height: 82vh;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.25);
    border: 1px solid rgba(148, 163, 184, 0.35);
    cursor: col-resize;
    position: sticky;
    top: 5.5rem;
}

.requirements-splitter:hover {
    background: rgba(148, 163, 184, 0.35);
}

.requirements-splitter:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.requirements-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    padding-right: 0.5rem;
    flex: 1;
}

/* Custom scrollbar for requirements list */
.requirements-sidebar::-webkit-scrollbar {
    width: 6px;
}

.requirements-sidebar::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.requirements-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

.requirements-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.requirement-details {
    position: sticky;
    top: 5.5rem;
    height: 82vh;
    max-height: 82vh;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
}

.requirement-detail-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Custom scrollbar for details pane */
.requirement-detail-content::-webkit-scrollbar {
    width: 6px;
}

.requirement-detail-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.requirement-detail-content::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

.requirement-detail-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.requirement-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
}

.requirement-simple {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    min-width: 0;
    width: 100%;
}

.requirement-simple .requirement-code {
    flex-shrink: 0;
}

.requirement-simple .requirement-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Density options for requirement list */
html[data-density="compact"] .requirement-item {
    padding: 0.55rem 0.7rem;
    gap: 0.6rem;
}

html[data-density="compact"] .requirements-sidebar {
    gap: 0.35rem;
}

html[data-density="compact"] .requirement-title {
    font-size: var(--font-size-sm);
}

html[data-density="compact"] .requirement-meta {
    gap: 0.25rem;
    margin-top: 0.15rem;
}

html[data-density="compact"] .tag-pill,
html[data-density="compact"] .meta-chip {
    padding: 0.05rem 0.55rem;
    font-size: 0.73rem;
}

html[data-density="compact"] .requirement-hint {
    margin-top: 0.25rem;
    font-size: 0.82rem;
    gap: 0.3rem;
}

html[data-density="dense"] .requirement-item {
    padding: 0.45rem 0.6rem;
    gap: 0.55rem;
}

html[data-density="dense"] .requirements-sidebar {
    gap: 0.25rem;
}

html[data-density="dense"] .requirement-title {
    font-size: var(--font-size-xs);
    line-height: 1.3;
}

html[data-density="dense"] .requirement-meta {
    gap: 0.2rem;
    margin-top: 0.1rem;
}

html[data-density="dense"] .tag-pill,
html[data-density="dense"] .meta-chip {
    padding: 0.05rem 0.45rem;
    font-size: 0.7rem;
}

html[data-density="dense"] .requirement-hint {
    margin-top: 0.2rem;
    font-size: 0.78rem;
    gap: 0.25rem;
}

html[data-density="dense"] .requirement-code,
html[data-density="dense"] .requirement-name {
    font-size: var(--font-size-sm);
}

/* Make details pane easier to read/edit */
.requirement-narrative p {
    line-height: 1.7;
    color: var(--text-secondary);
}

.compliance-controls .compliance-comment {
    width: 100%;
    min-height: 160px;
    resize: vertical;
    line-height: 1.6;
}

@media (max-width: 1000px) {
    .requirements-layout {
        grid-template-columns: 1fr;
    }
    .requirements-splitter {
        display: none;
    }
    .requirement-details {
        position: static;
        height: auto;
        max-height: none;
    }
    .requirements-list {
        height: auto;
        max-height: none;
    }
}

.requirement-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.requirement-title {
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.4;
}

.requirement-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.25rem;
}

.tag-pill {
    border: 1px solid var(--border-light);
    border-radius: 999px;
    padding: 0.1rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: transparent;
}

.tag-pill.muted {
    color: var(--text-muted);
    border-color: var(--border-medium);
}

.meta-chip {
    border-radius: 999px;
    padding: 0.1rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.meta-chip.warning {
    background: rgba(249, 115, 22, 0.12);
    color: var(--warning-color);
}

.meta-chip.info {
    background: rgba(59, 130, 246, 0.12);
    color: var(--info-color);
}

.requirement-hint {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.hint-icon {
    font-size: 0.9rem;
}

.requirement-code-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.requirement-name {
    margin: 0;
    font-size: var(--font-size-base);
    color: var(--text-secondary);
}

.requirement-item:hover {
    background: var(--bg-elevated);
    border-color: var(--border-medium);
    transform: translateY(-1px);
}

.requirement-item.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.requirement-item.active .requirement-status {
    color: rgba(255, 255, 255, 0.9);
}

.requirement-item:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.requirement-code {
    font-weight: 600;
    font-size: var(--font-size-base);
}


.url-indicator {
    font-size: var(--font-size-base);
    padding: 0.125rem 0.25rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: var(--radius-sm);
    cursor: help;
    opacity: 0.8;
}
.requirement-status.partial {
    background: var(--chip-bg-warning);
    color: var(--warning-color);
    border: 1px solid var(--chip-br-warning);
}

.requirement-status.na {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-medium);
}

.requirement-status.not-set {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border: 1px solid var(--border-light);
}

.requirement-details {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border-light);
    min-height: 400px;
}

.requirement-detail-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.requirement-detail-subtitle {
    margin: 0.15rem 0 0;
    color: var(--text-secondary);
}

.detail-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.requirement-narrative {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 1px solid var(--border-light);
    margin-bottom: 1.5rem;
}

.narrative-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.detail-mode-toggle {
    display: inline-flex;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.15rem;
}

.detail-mode-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
}

.detail-mode-btn.active {
    background: var(--primary-color);
    color: white;
}

.requirement-insights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.insight-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: var(--bg-secondary);
}

.next-actions-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.next-actions-list li {
    display: flex;
    gap: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.action-icon {
    font-size: 1rem;
}

.empty-state-sm {
    margin: 0;
    color: var(--text-muted);
}

.evidence-checklist ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.evidence-item {
    border: 1px dashed var(--border-light);
    padding: 0.65rem;
    border-radius: var(--radius-md);
}

.evidence-item label {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-weight: 600;
    cursor: pointer;
}

.evidence-item input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
}

.evidence-item p {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.requirement-detail-content h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: var(--font-size-large);
    font-weight: 600;
}

.requirement-detail-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Linked Projects Section */
.linked-projects-section {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid var(--border-light);
}

.linked-projects-section h5 {
    margin: 0 0 1rem 0;
    color: var(--primary-color);
    font-weight: 600;
}

.linked-projects-list {
    margin-bottom: 1rem;
}

.linked-project-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

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

.project-name {
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

.project-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: var(--font-size-base);
    font-weight: 500;
    margin: 0 0.5rem;
}

.no-projects {
    color: var(--text-secondary);
    font-style: italic;
    margin: 0;
    padding: 1rem;
    text-align: center;
    background: var(--bg-secondary);
    border-radius: 4px;
    border: 1px solid var(--border-light);
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-base);
}

.btn-link {
    background: none;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.btn-link:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
    color: var(--text-primary);
}

/* Tag System Styles */
.tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: var(--font-size-base);
    font-weight: 500;
    color: white;
    margin: 2px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.tag:hover {
    opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

.tag-manager {
    margin: 16px 0;
    padding: 16px;
    background: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.tag-manager h5 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: var(--font-size-large);
}

.tag-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.tag-selector.tag-selector-inline {
    gap: 0.5rem;
}

.tag-option {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: var(--font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid;
}

.tag-option.selected {
    color: white;
    border-color: transparent;
}

.tag-option:not(.selected) {
    color: var(--text-secondary);
    border-color: var(--border-color);
    background: transparent;
}

.tag-option:not(.selected):hover {
    border-color: var(--accent-color);
    color: var(--text-primary);
}

.tag-option.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.tags-display {
    margin-top: 8px;
}

.tag-filters {
    margin: 16px 0;
    padding: 12px;
    background: var(--surface-color);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.tag-filters-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.tag-filters-title {
    flex: 1;
    min-width: 200px;
}

.tag-filters h5 {
    margin: 0 0 8px 0;
    font-size: var(--font-size-large);
    color: var(--text-primary);
}

.tag-filters-hint {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.tag-filters-body {
    margin-top: 0.5rem;
}

.tag-filters-collapsed-msg {
    display: none;
    margin-top: 0.5rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.tag-filters.collapsed .tag-filters-body {
    display: none;
}

.tag-filters.collapsed .tag-filters-collapsed-msg {
    display: block;
}

/* Compact tag filters in requirements list so the requirement list stays the focus */
.requirements-list .tag-filters {
    margin: 0.75rem 0;
    padding: 0.75rem;
}

.requirements-list .tag-filters h5 {
    margin: 0;
    font-size: 1rem;
}

.requirements-list .tag-filters-hint {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    line-height: 1.3;
}

.requirements-list .tag-filters-body {
    max-height: 7.5rem;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.requirements-list .tag-selector {
    gap: 6px;
    margin-bottom: 0;
}

.requirements-list .tag-option {
    padding: 4px 10px;
    font-size: 0.9rem;
}

.tag-management-area {
    margin: 16px 0;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    max-height: 300px;
    overflow-y: auto;
}

.tag-management-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: var(--surface-color);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

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

.tag-management-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.tag-management-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.tag-management-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.tag-management-name {
    font-weight: 600;
    font-size: var(--font-size-base);
    color: var(--text-primary);
}

.tag-management-description {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
}

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

.tag-add-form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    align-items: center;
}

.tag-add-form input[type="text"] {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--surface-color);
    color: var(--text-primary);
    font-size: var(--font-size-base);
}

.tag-add-form input[type="text"]:first-child {
    flex: 0 0 120px;
}

.tag-add-form input[type="text"]:last-of-type {
    flex: 1;
}

.tag-add-form input[type="color"] {
    width: 50px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
}

.tag-add-form input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.clear-tags {
    font-size: var(--font-size-base);
    color: var(--accent-color);
    cursor: pointer;
    margin-left: 8px;
}

.clear-tags:hover {
    text-decoration: underline;
}

.compliance-controls {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.compliance-controls h5 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: var(--font-size-large);
    font-weight: 600;
}

.compliance-status-picker {
    margin-bottom: 1rem;
}

.compliance-status-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.compliance-status-button {
    border: 1px solid var(--border-light);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.65rem 0.95rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.compliance-status-button:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.compliance-status-button.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
}

.compliance-status-button.status-yes {
    border-color: #22c55e;
}

.compliance-status-button.status-no {
    border-color: #ef4444;
}

.compliance-status-button.status-partial {
    border-color: #f59e0b;
}

.compliance-status-button.status-na {
    border-color: #0ea5e9;
}

.compliance-comment {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    color: var(--text-primary);
    font-size: var(--font-size-base);
    width: 100%;
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.compliance-url {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    color: var(--text-primary);
    font-size: var(--font-size-base);
    width: 100%;
    margin-bottom: 0.25rem;
    font-family: inherit;
}

/* Focus states for form controls */
.compliance-status-button:focus-visible,
.compliance-comment:focus-visible,
.compliance-url:focus-visible,
input[type="text"]:focus-visible,
input[type="url"]:focus-visible,
input[type="date"]:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
    border-color: var(--primary-color);
}

.field-help {
    display: block;
    margin-bottom: 1rem;
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    font-style: italic;
}

.requirement-url-section {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.requirement-url-section h5 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: var(--font-size-large);
    font-weight: 600;
}

.url-display {
    margin: 0;
}

.requirement-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: var(--font-size-base);
    word-break: break-all;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.requirement-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.external-icon {
    font-size: var(--font-size-base);
    opacity: 0.7;
    flex-shrink: 0;
}

.placeholder-content {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem 1rem;
}

.placeholder-content h4 {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Responsive layout for requirements */
@media (max-width: 1024px) {
    .requirements-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .requirements-list {
        order: 2;
        height: 50vh;
        max-height: 50vh;
    }

    .requirement-details {
        order: 1;
        position: static;
        height: 60vh;
        max-height: 60vh;
    }
}

/* Projects Layout - similar to requirements */
.projects-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

.project-requirements-widget {
    margin-top: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.project-requirements-widget .widget-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.project-requirements-grid {
    margin-top: 1.25rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.project-requirement-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 130px;
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.project-requirement-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 230px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.project-requirement-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0.5rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.project-requirement-row:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

.project-requirement-title {
    font-weight: 600;
    font-size: var(--font-size-base);
    color: var(--text-primary);
}

.project-requirement-meta {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-top: 0.1rem;
}

.project-requirement-meta .requirement-code {
    font-family: 'Inter', 'SFMono-Regular', 'Roboto Mono', monospace;
    letter-spacing: 0.04em;
    color: var(--text-primary);
}

.project-requirement-row .requirement-status {
    margin: 0;
}

.project-requirement-card .empty-state {
    margin: 0;
    border: none;
    background: transparent;
}

.projects-list-panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-light);
    height: fit-content;
}

.projects-list-panel h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: var(--font-size-large);
    font-weight: 600;
}

.projects-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-item:hover {
    background: var(--bg-elevated);
    border-color: var(--border-medium);
    transform: translateY(-1px);
}

.project-item.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.project-item.active .project-meta {
    color: rgba(255, 255, 255, 0.9);
}

.subtitle-sm {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

.my-work-filter-bar {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    justify-content: space-between;
}

.my-work-user {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 180px;
}

.my-work-user label {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.my-work-user input {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    padding: 0.35rem 0.65rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-width: 160px;
    font-size: var(--font-size-base);
}

.my-work-filter-bar .filter-labels {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 180px;
}

.my-work-filter-bar .btn-link {
    margin-left: auto;
    align-self: flex-start;
}

.my-work-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

.my-work-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr);
    gap: 1.5rem;
}

.my-work-list-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.my-work-list-panel .list-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: var(--font-size-large);
    font-weight: 600;
}

.my-work-list-panel .list-header p {
    margin: 0;
}

.my-work-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.my-work-list .requirement-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.requirement-card .requirement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.requirement-card .requirement-header h4 {
    margin: 0;
    font-size: var(--font-size-large);
    color: var(--text-primary);
}

.requirement-card .requirement-meta {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

.requirement-card .requirement-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.requirement-card .requirement-description {
    margin: 0;
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    line-height: 1.4;
}

.requirement-card .requirement-meta {
    margin: 0;
    font-size: var(--font-size-base);
    color: var(--text-secondary);
}

.my-work-visuals {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mini-heatmap-card,
.my-work-progress-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.mini-heatmap-card h4,
.my-work-progress-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: var(--font-size-large);
    color: var(--text-primary);
}

.mini-heatmap-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-height: 60px;
}

.mini-heatmap-grid .requirement-chip {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.my-work-progress-card .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}

.my-work-progress-card .stat-number {
    font-size: var(--font-size-large);
    color: var(--primary-color);
    margin: 0.2rem 0;
}

.my-work-progress-card .stat-label {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    text-transform: none;
}

#myWorkEmptyState {
    border: 1px dashed var(--border-light);
    padding: 1.5rem;
    margin: 0;
}

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

    .my-work-filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .my-work-filter-bar .btn-link {
        margin-left: 0;
    }
}

.project-name {
    font-weight: 600;
    font-size: var(--font-size-base);
}

.project-meta {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-status {
    font-size: var(--font-size-base);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.project-status.planning {
    background: var(--chip-bg-info);
    color: var(--info-color);
    border: 1px solid var(--chip-br-info);
}

.project-status.active {
    background: var(--chip-bg-success);
    color: var(--success-color);
    border: 1px solid var(--chip-br-success);
}

.project-status.on-hold {
    background: var(--chip-bg-warning);
    color: var(--warning-color);
    border: 1px solid var(--chip-br-warning);
}

.project-status.completed {
    background: var(--chip-bg-success);
    color: var(--success-color);
    border: 1px solid var(--chip-br-success);
}

.project-details-panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border-light);
    min-height: 500px;
}

.project-detail-content h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: var(--font-size-large);
    font-weight: 600;
}

.project-detail-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-detail-meta {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 1.5rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.project-detail-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.project-detail-meta-label {
    font-size: var(--font-size-base);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-detail-meta-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Project Risks Section */
.project-risks-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.project-risks-section h5 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: var(--font-size-large);
    font-weight: 600;
}

.risks-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.risk-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

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

.risk-content h6 {
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
    font-size: var(--font-size-large);
    font-weight: 600;
}

.risk-content p {
    margin: 0 0 0.5rem 0;
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    line-height: 1.4;
}

.risk-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.risk-severity {
    font-size: var(--font-size-base);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

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

.severity-medium {
    background: var(--warning-color);
    color: white;
}

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

.risk-probability {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
}

.risk-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Responsive layout for projects */
@media (max-width: 1024px) {
    .projects-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .projects-list-panel {
        order: 2;
    }

    .project-details-panel {
        order: 1;
    }
}
.domains-grid-section {
    margin-bottom: 3rem;
}

.domains-grid-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.domains-grid-toolbar h3 {
    margin: 0;
    font-size: var(--font-size-large);
    color: var(--text-primary);
}

.domains-grid-toolbar .subtitle-sm {
    margin: 0.15rem 0 0 0;
    color: var(--text-secondary);
}

.domains-grid-section.collapsed .domains-grid {
    display: none;
}

.domains-grid-collapsed-msg {
    display: none;
    padding: 1rem;
    border-radius: var(--radius-xl);
    border: 1px dashed var(--border-light);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.domains-grid-section.collapsed .domains-grid-collapsed-msg {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.domains-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
}

.domain-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 1rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.domain-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.domain-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.pulse-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
}

.domain-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.domain-card:hover::before {
    transform: scaleX(1);
}

.domain-card h3 {
    margin: 0;
    font-size: var(--font-size-large);
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.domain-card p {
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.requirements-heatmap {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.heatmap-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.heatmap-header h3 {
    margin: 0;
    font-size: var(--font-size-large);
    font-weight: 600;
}

.heatmap-header p {
    margin: 0.25rem 0 0;
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

.heatmap-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.legend-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.55rem;
    font-size: var(--font-size-base);
    border: 1px solid transparent;
}

.legend-chip::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

.legend-chip.yes {
    color: var(--success-color);
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.15);
}

.legend-chip.partial {
    color: var(--warning-color);
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.15);
}

.legend-chip.no {
    color: var(--danger-color);
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.15);
}

.legend-chip.na {
    color: var(--text-muted);
    border-color: rgba(148, 163, 184, 0.4);
    background: rgba(148, 163, 184, 0.15);
}

.legend-chip.not-set {
    color: var(--border-dark);
    border-color: rgba(100, 116, 139, 0.4);
    background: rgba(100, 116, 139, 0.15);
}

.domain-requirements-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.domain-requirements-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 180px;
}

.gap-report-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gap-report-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.gap-report-header h3 {
    margin: 0;
    font-size: var(--font-size-large);
    font-weight: 600;
}

.gap-report-controls {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.gap-report-controls label {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gap-report-controls select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    min-width: 220px;
}

.gap-report-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.gap-summary-total {
    font-weight: 600;
    color: var(--text-primary);
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
}

.gap-summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: var(--font-size-base);
    border: 1px solid transparent;
    text-transform: none;
}

.gap-summary-chip span {
    font-weight: 600;
}

.gap-summary-chip.no {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: var(--danger-color);
}

.gap-summary-chip.partial {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.35);
    color: var(--warning-color);
}

.gap-summary-chip.not-set {
    background: rgba(148, 163, 184, 0.15);
    border-color: rgba(148, 163, 184, 0.35);
    color: var(--text-secondary);
}

.gap-report-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gap-report-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.gap-report-item-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.gap-report-item-header h4 {
    margin: 0;
    font-size: var(--font-size-large);
    color: var(--text-primary);
}

.gap-report-item p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.gap-report-item-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: var(--font-size-base);
    color: var(--text-muted);
}

.gap-report-item-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.gap-report-item .btn-link {
    align-self: flex-start;
}

@media (max-width: 768px) {
    .gap-report-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .gap-report-controls select,
    .gap-report-controls .btn {
        width: 100%;
    }
}

.unassigned-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.unassigned-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.unassigned-header h3 {
    margin: 0;
    font-size: var(--font-size-large);
    font-weight: 600;
}

.unassigned-count {
    font-weight: 600;
    color: var(--danger-color);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.unassigned-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.unassigned-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    box-shadow: var(--shadow-sm);
}

.unassigned-card h4 {
    margin: 0;
    font-size: var(--font-size-large);
    color: var(--text-primary);
}

.unassigned-card p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.unassigned-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: var(--font-size-base);
    color: var(--text-muted);
}

.unassigned-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.domain-card-header {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0.75rem;
}

.domain-card-header h4 {
    margin: 0;
    font-size: var(--font-size-large);
    font-weight: 600;
    color: var(--text-primary);
}

.domain-card-header p {
    margin: 0.25rem 0 0;
    font-size: var(--font-size-base);
    color: var(--text-secondary);
}

.requirement-chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16px, 1fr));
    gap: 0.4rem;
    flex: 1;
    min-height: 60px;
}

.requirement-chip {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 4px;
    display: inline-block;
    transition: transform 0.2s ease;
    border: 1px solid transparent;
}

.progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.progress-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 220px;
}

.progress-card-tier {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.progress-card-label {
    margin: 0 0 0.35rem;
    font-size: var(--font-size-large);
    font-weight: 600;
    color: var(--text-primary);
}

.progress-tier-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: var(--font-size-small);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    font-weight: 600;
}

.progress-tier-pill.leading {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success-color);
}

.progress-tier-pill.steady {
    background: rgba(234, 179, 8, 0.12);
    color: var(--warning-color);
}

.progress-tier-pill.lagging {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

.progress-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    color: var(--text-secondary);
}

.progress-percentage {
    font-size: 2rem;
    line-height: 1;
    font-weight: 700;
    color: var(--text-primary);
}

.progress-completed {
    font-size: var(--font-size-base);
}

.progress-card .progress-bar {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.progress-card .progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

.progress-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.status-chip {
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: var(--font-size-small);
    font-weight: 600;
    border: 1px solid transparent;
    text-transform: none;
}

.status-chip.yes {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.4);
    color: var(--success-color);
}

.status-chip.partial {
    background: rgba(234, 179, 8, 0.12);
    border-color: rgba(234, 179, 8, 0.4);
    color: var(--warning-color);
}

.status-chip.no {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
    color: var(--danger-color);
}

.progress-focus {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}

.progress-focus-label {
    margin: 0;
    font-size: var(--font-size-small);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.progress-focus-value {
    margin: 0.15rem 0 0;
    font-size: var(--font-size-base);
    color: var(--text-primary);
    font-weight: 500;
}

.progress-focus-status {
    border-radius: 999px;
    padding: 0.2rem 0.75rem;
    font-size: var(--font-size-small);
    font-weight: 600;
}

.progress-focus-status.yes,
.progress-focus-status.na {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success-color);
}

.progress-focus-status.partial {
    background: rgba(234, 179, 8, 0.12);
    color: var(--warning-color);
}

.progress-focus-status.no,
.progress-focus-status.not-set {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger-color);
}

.progress-momentum {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size-small);
    padding: 0.5rem 0 0;
    border-top: 1px dashed var(--border-light);
    color: var(--text-secondary);
}

.progress-momentum.up {
    color: var(--success-color);
}

.progress-momentum.down {
    color: var(--danger-color);
}

.momentum-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.momentum-value {
    font-weight: 600;
}

.progress-actions {
    display: flex;
    justify-content: flex-start;
}

.progress-intelligence {
    margin: 2rem 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.progress-insights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.progress-insight-card {
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.progress-insight-card.success {
    border-color: rgba(34, 197, 94, 0.4);
}

.progress-insight-card.warning {
    border-color: rgba(234, 179, 8, 0.5);
}

.progress-insight-card.danger {
    border-color: rgba(239, 68, 68, 0.4);
}

.progress-insight-card.neutral {
    border-color: rgba(148, 163, 184, 0.6);
}

.insight-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: var(--font-size-small);
    color: var(--text-secondary);
    margin: 0 0 0.35rem;
}

.progress-insight-card h4 {
    margin: 0;
    font-size: var(--font-size-large);
}

.insight-stat {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.35rem 0;
}

.insight-meta,
.insight-footnote {
    margin: 0;
    font-size: var(--font-size-base);
    color: var(--text-secondary);
}

.insight-footnote {
    margin-top: 0.35rem;
    font-size: var(--font-size-small);
}

.insight-empty {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px dashed var(--border-light);
    padding: 1rem;
    font-size: var(--font-size-base);
    color: var(--text-secondary);
}

.progress-focus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.focus-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.focus-card-header h4 {
    margin: 0.15rem 0 0;
    font-size: var(--font-size-large);
}

.focus-card-label {
    font-size: var(--font-size-small);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin: 0;
}

.scoreboard-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.scoreboard-group {
    flex: 1 1 180px;
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-lg);
    padding: 0.85rem;
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.scoreboard-count {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.scoreboard-label {
    margin: 0;
    font-size: var(--font-size-base);
    font-weight: 600;
}

.scoreboard-description,
.scoreboard-names {
    margin: 0;
    font-size: var(--font-size-small);
    color: var(--text-secondary);
}

.blocker-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.blocker-list li {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 0.85rem;
    background: var(--bg-elevated);
}

.blocker-item {
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.blocker-item:hover,
.blocker-item:focus-visible {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-1px);
    outline: none;
}

.blocker-item:focus-visible {
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.35);
}

.blocker-title {
    margin: 0;
    font-weight: 600;
    font-size: var(--font-size-base);
    color: var(--text-primary);
}

.blocker-meta {
    margin: 0.15rem 0 0;
    font-size: var(--font-size-small);
    color: var(--text-secondary);
}

.blocker-comment {
    margin: 0.5rem 0 0;
    font-size: var(--font-size-base);
    color: var(--text-secondary);
}

.blocker-empty {
    border-style: dashed;
    text-align: center;
    font-style: italic;
    color: var(--text-secondary);
}

.progress-history {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.progress-history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.progress-history-header h3 {
    margin: 0;
    font-size: var(--font-size-large);
    color: var(--text-primary);
}

.progress-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.history-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 170px;
}

.history-card.empty {
    min-height: 0;
    justify-content: center;
    text-align: center;
}

.history-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.history-card-header h4 {
    margin: 0;
    font-size: var(--font-size-large);
}

.history-trend {
    font-size: var(--font-size-base);
    font-weight: 600;
    text-transform: none;
}

.history-trend.trend-up {
    color: var(--success-color);
}

.history-trend.trend-down {
    color: var(--danger-color);
}

.history-trend.trend-neutral {
    color: var(--text-secondary);
}

.history-dots {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.history-dot {
    background: var(--bg-secondary);
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: var(--font-size-base);
    border: 1px solid var(--border-light);
}

.history-summary {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: var(--font-size-base);
    color: var(--text-secondary);
}

.history-summary strong {
    color: var(--text-primary);
}

.history-empty-msg,
.empty-history {
    color: var(--text-secondary);
    margin: 0;
    font-style: italic;
}

.recent-updates-card {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recent-updates-header h4 {
    margin: 0;
    font-size: var(--font-size-large);
}

.recent-updates-header p {
    margin: 0;
    font-size: var(--font-size-base);
    color: var(--text-secondary);
}

.recent-update {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    border: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.recent-update:hover {
    border-color: var(--border-light);
}

.recent-update-title {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-base);
}

.recent-update-meta {
    margin: 0;
    font-size: var(--font-size-base);
    color: var(--text-secondary);
}

.recent-update-status {
    font-size: var(--font-size-base);
    font-weight: 600;
    padding: 0.15rem 0.7rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    display: inline-block;
    border: 1px solid transparent;
}

.recent-update-status.yes {
    background: var(--chip-bg-success);
    color: var(--success-color);
    border-color: rgba(16, 185, 129, 0.4);
}

.recent-update-status.partial {
    background: var(--chip-bg-warning);
    color: var(--warning-color);
    border-color: rgba(245, 158, 11, 0.4);
}

.recent-update-status.no {
    background: var(--chip-bg-danger);
    color: var(--danger-color);
    border-color: rgba(239, 68, 68, 0.4);
}

.recent-update-status.na {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
    border-color: rgba(148, 163, 184, 0.4);
}

.recent-update-status.not-set {
    background: var(--bg-secondary);
    color: var(--text-muted);
    border-color: var(--border-light);
}

.trend-watch-card {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.trend-watch-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.trend-watch-header h4 {
    margin: 0;
    font-size: var(--font-size-large);
}

.trend-watch-header p {
    margin: 0.25rem 0 0;
    font-size: var(--font-size-base);
    color: var(--text-secondary);
}

.trend-watch-controls {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr;
    gap: 0.5rem 0.75rem;
    align-items: center;
    min-width: 320px;
}

.trend-watch-controls label {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
}

.trend-watch-controls select {
    padding: 0.4rem 0.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    color: var(--text-primary);
}

.trend-watch-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.trend-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    font-size: var(--font-size-base);
    color: var(--text-secondary);
}

.trend-chip strong {
    color: var(--text-primary);
}

.trend-chip.trend-up {
    border-color: rgba(16, 185, 129, 0.4);
}

.trend-chip.trend-down {
    border-color: rgba(239, 68, 68, 0.4);
}

.trend-chip.trend-neutral {
    border-color: var(--border-light);
}

.trend-watch-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.trend-watch-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.trend-watch-item:hover {
    border-color: var(--border-light);
}

.trend-watch-title {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-base);
}

.trend-watch-meta {
    margin: 0.2rem 0 0;
    font-size: var(--font-size-base);
    color: var(--text-secondary);
}

.trend-watch-badges {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.trend-flag {
    font-size: var(--font-size-base);
    font-weight: 600;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.trend-flag.flag-stuck {
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger-color);
    background: var(--chip-bg-danger);
}

.trend-flag.flag-improving {
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--success-color);
    background: var(--chip-bg-success);
}

.trend-flag.flag-regressing {
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger-color);
    background: var(--chip-bg-danger);
}

.requirement-history {
    border-top: 1px solid var(--border-light);
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.requirement-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.requirement-history-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.7rem;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid transparent;
}

.requirement-history-list li:hover {
    border-color: var(--border-light);
}

.history-entry-status {
    font-size: var(--font-size-base);
    font-weight: 600;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.history-entry-status.yes {
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.history-entry-status.partial {
    color: var(--warning-color);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.history-entry-status.no {
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.history-entry-status.na {
    color: var(--text-secondary);
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.history-entry-status.not-set {
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
}

.history-entry-meta {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
}

.requirement-chip:hover {
    transform: translateY(-2px);
}

.requirement-chip.yes {
    background: var(--success-color);
    border-color: rgba(16, 185, 129, 0.6);
}

.requirement-chip.partial {
    background: var(--warning-color);
    border-color: rgba(245, 158, 11, 0.6);
}

.requirement-chip.no {
    background: var(--danger-color);
    border-color: rgba(239, 68, 68, 0.6);
}

.requirement-chip.na {
    background: rgba(148, 163, 184, 0.5);
    border-color: rgba(148, 163, 184, 0.7);
}

.requirement-chip.not-set {
    background: rgba(100, 116, 139, 0.35);
    border-color: rgba(100, 116, 139, 0.6);
}

.requirement-chip[title] {
    cursor: help;
}

/* Enhanced Pulse Animation */
.pulse-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    flex-shrink: 0;
}

.pulse-dot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: pulse 2.8s infinite;
}

.pulse-dot.healthy {
    background: var(--success-color);
}

.pulse-dot.healthy::before {
    background: var(--success-color);
}

.pulse-dot.warning {
    background: var(--warning-color);
}

.pulse-dot.warning::before {
    background: var(--warning-color);
}

.pulse-dot.critical {
    background: var(--danger-color);
}

.pulse-dot.critical::before {
    background: var(--danger-color);
}

.domain-stats {
    margin-bottom: 1rem;
}

.health-text {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.35;
    }
    100% {
        transform: scale(1.7);
        opacity: 0;
    }
}

/* Welcome Dashboard */
.welcome-dashboard {
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 2rem;
}

.dashboard-header h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: var(--font-size-large);
    font-weight: 600;
}

.dashboard-subtitle {
    color: var(--text-secondary);
    margin: 0;
    font-size: var(--font-size-base);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.stat-number {
    font-size: var(--font-size-large);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.domain-summary h4,
.quick-actions h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: var(--font-size-large);
    font-weight: 600;
}

.domain-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.domain-summary-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

.domain-summary-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.domain-summary-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.domain-summary-count {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    margin-bottom: 0.5rem;
}

.domain-summary-desc {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    line-height: 1.4;
}

.action-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.action-card h5 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: var(--font-size-large);
    font-weight: 600;
}

.action-card p {
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    line-height: 1.4;
}

.pspf-highlights {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-light);
}

.pspf-highlights h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: var(--font-size-large);
    font-weight: 600;
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.highlight-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.highlight-icon {
    font-size: var(--font-size-base);
    flex-shrink: 0;
}

.highlight-content h6 {
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
    font-size: var(--font-size-large);
    font-weight: 600;
}

.highlight-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    line-height: 1.4;
}

@media (max-width: 1024px) {
    .dashboard-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

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

    .highlights-grid {
        grid-template-columns: 1fr;
    }
}
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.stat-card:active {
    transform: translateY(-2px);
}

.essential-eight-card {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.essential-eight-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.essential-eight-header h3 {
    margin: 0;
    font-size: var(--font-size-large);
    color: var(--text-primary);
}

.essential-eight-subtitle {
    margin: 0.35rem 0 0 0;
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    max-width: 520px;
}

.essential-eight-score {
    text-align: right;
}

.essential-eight-score-value {
    display: block;
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.essential-eight-score-label {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
}

.essential-eight-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.e8-chip {
    font-size: var(--font-size-base);
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.e8-chip.yes {
    background: var(--chip-bg-success);
    color: var(--success-color);
    border-color: var(--chip-br-success);
}

.e8-chip.partial {
    background: var(--chip-bg-warning);
    color: var(--warning-color);
    border-color: var(--chip-br-warning);
}

.e8-chip.no {
    background: var(--chip-bg-danger);
    color: var(--danger-color);
    border-color: var(--chip-br-danger);
}

.e8-chip.na {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-color: var(--border-medium);
}

.e8-chip.not-set {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border-color: var(--border-light);
}

.essential-eight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.essential-eight-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.essential-eight-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.e8-item-header {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.e8-order {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--primary-color);
    background: var(--primary-color-transparent);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.e8-item-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

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

.e8-id {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.e8-description {
    margin: 0;
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

.e8-status-pill {
    display: inline-block;
    font-size: var(--font-size-base);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-pill);
    border-width: 1px;
    border-style: solid;
    width: fit-content;
}

.essential-eight-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.essential-eight-note {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .essential-eight-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .essential-eight-score {
        text-align: left;
    }
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.stat-icon {
    font-size: var(--font-size-base);
    opacity: 0.8;
}

.stat-number {
    display: block;
    font-size: var(--font-size-large);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    animation: countUp 1s ease-out;
}

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

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    font-size: var(--font-size-base);
    letter-spacing: 0.05em;
}

.progress-ring {
    position: relative;
    width: 60px;
    height: 60px;
}

.progress-ring svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.progress-ring-background {
    fill: none;
    stroke: var(--border-light);
    stroke-width: 4;
}

.progress-ring-progress {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.5s ease-in-out;
}

.progress-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: var(--font-size-base);
    font-weight: 500;
}

.trend-up {
    color: var(--success-color);
}

.trend-down {
    color: var(--danger-color);
}

.trend-neutral {
    color: var(--text-secondary);
}

.mini-chart {
    height: 30px;
    margin: 0.5rem 0;
    position: relative;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.mini-chart-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-sm);
    transition: width 1.5s ease-in-out;
    position: relative;
    width: 0%;
}

.mini-chart-bar.risk-chart {
    background: linear-gradient(90deg, var(--warning-color), var(--danger-color));
}

.mini-chart-bar.incident-chart {
    background: linear-gradient(90deg, var(--info-color), var(--primary-color));
}

.mini-chart-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2));
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Enhanced Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: var(--font-size-base);
    line-height: 1.25rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-dark);
}

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

.btn-danger:hover {
    background: #dc2626;
    transform: none;
}

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

.btn-success:hover {
    background: #059669;
    transform: none;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

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

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-base);
}

/* Focus states for accessibility */
.btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-primary:focus-visible {
    outline-color: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.4);
}

.btn-danger:focus-visible {
    outline-color: var(--danger-color);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.3);
}

/* Requirement Management Styles */
.requirement-mgmt-item {
    transition: all 0.2s ease;
}

.requirement-mgmt-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Enhanced Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal[style*="block"] {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.modal-content h3 {
    margin: 0 0 1.5rem 0;
    padding: 1.5rem 1.5rem 0 1.5rem;
    font-size: var(--font-size-large);
    font-weight: 600;
    color: var(--text-primary);
}

/* Modal header with explicit close button */
.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 1.5rem 0 1.5rem;
}

.modal-header h2,
.modal-header h3 {
    margin: 0;
    padding: 0;
}

.modal-header + * {
    margin-top: 1rem;
}

.modal-close {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    line-height: 1;
    font-size: 1.25rem;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.modal-close:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Requirements checklist */
.requirements-checklist {
    max-height: 280px;
    overflow: auto;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 8px;
    margin: 0 1.5rem 1rem 1.5rem;
    background: var(--bg-elevated);
}

/* Welcome modal list */
.welcome-list {
    text-align: left;
    color: var(--text-secondary);
    margin: 1rem 0;
    list-style: none;
    padding-left: 0;
}

.welcome-steps {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.welcome-steps .step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.welcome-steps .step-number {
    min-width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    font-weight: 600;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.25rem;
    padding: 0 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    transition: all 0.2s ease;
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn:focus-visible, .nav-btn:focus-visible, .tab-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-elevated);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge.not-started {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.status-badge.in-progress {
    background: var(--chip-bg-info);
    color: var(--info-color);
    border: 1px solid var(--chip-br-info);
}

.status-badge.completed {
    background: var(--chip-bg-success);
    color: var(--success-color);
    border: 1px solid var(--chip-br-success);
}

.status-badge.blocked {
    background: var(--chip-bg-danger);
    color: var(--danger-color);
    border: 1px solid var(--chip-br-danger);
}

/* Project status variants */
.status-badge.planning {
    background: var(--chip-bg-info);
    color: var(--info-color);
    border: 1px solid var(--chip-br-info);
}
.status-badge.active {
    background: var(--chip-bg-success);
    color: var(--success-color);
    border: 1px solid var(--chip-br-success);
}
.status-badge.on-hold {
    background: var(--chip-bg-warning);
    color: var(--warning-color);
    border: 1px solid var(--chip-br-warning);
}

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-medium);
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Enhanced Risk Management Styles */
.risk-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.risk-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
}

.risk-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.risk-card.severity-low::before {
    background: var(--success-color);
}

.risk-card.severity-medium::before {
    background: var(--warning-color);
}

.risk-card.severity-high::before {
    background: #f97316;
}

.risk-card.severity-critical::before {
    background: var(--danger-color);
}

.risk-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.risk-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: var(--font-size-large);
    font-weight: 600;
}

.risk-severity {
    margin-left: 1rem;
}

.severity-badge {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.severity-badge.low {
    background: var(--chip-bg-success);
    color: var(--success-color);
    border: 1px solid var(--chip-br-success);
}

.severity-badge.medium {
    background: var(--chip-bg-warning);
    color: var(--warning-color);
    border: 1px solid var(--chip-br-warning);
}

.severity-badge.high {
    background: var(--chip-bg-orange);
    color: #f97316;
    border: 1px solid var(--chip-br-orange);
}

.severity-badge.critical {
    background: var(--chip-bg-danger);
    color: var(--danger-color);
    border: 1px solid var(--chip-br-danger);
    animation: criticalPulse 2s infinite;
}

@keyframes criticalPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.risk-description {
    color: var(--text-secondary);
    margin: 0.75rem 0;
    line-height: 1.5;
}

.risk-matrix {
    display: flex;
    gap: 1.5rem;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.risk-factor {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    flex: 1;
}

.factor-label {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.factor-value {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    text-transform: capitalize;
    text-align: center;
    border: 1px solid transparent;
}

.factor-value.very-low {
    background: var(--chip-bg-success);
    color: var(--success-color);
    border-color: var(--chip-br-success);
}

.factor-value.low {
    background: var(--chip-bg-info);
    color: var(--info-color);
    border-color: var(--chip-br-info);
}

.factor-value.medium {
    background: var(--chip-bg-warning);
    color: var(--warning-color);
    border-color: var(--chip-br-warning);
}

.factor-value.high {
    background: var(--chip-bg-orange);
    color: #f97316;
    border-color: var(--chip-br-orange);
}

.factor-value.very-high {
    background: var(--chip-bg-danger);
    color: var(--danger-color);
    border-color: var(--chip-br-danger);
}

.risk-mitigation {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--info-color);
    position: relative;
}

.risk-mitigation::before {
    content: '🛡️';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: var(--font-size-base);
    opacity: 0.6;
}

.risk-mitigation strong {
    color: var(--info-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.risk-mitigation p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.5;
}

.risk-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

/* Enhanced Search Results */
.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: var(--font-size-base);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-results {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-light);
    min-height: 200px;
    position: relative;
}

.spinner {
    border: 4px solid var(--border-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -20px;
    margin-left: -20px;
    display: none; /* Initially hidden */
}

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

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.search-result-item {
    background: var(--bg-elevated);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.search-result-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.search-result-clickable {
    cursor: pointer;
}

.search-result-clickable:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.search-result-item h4 {
    margin: 0.5rem 0;
    color: var(--text-primary);
    font-size: var(--font-size-large);
}

.search-result-item p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.result-domain {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.result-domain-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.result-domain-clickable:hover {
    background: var(--primary-color-transparent);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}
.result-type {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.result-type.risk {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
}

.result-type.project {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-color);
}

.result-type.requirement {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success-color);
}

.result-req-id {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    letter-spacing: 0.025em;
}

.result-severity {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    text-transform: uppercase;
}

.result-severity.severity-low {
    background: var(--chip-bg-success);
    color: var(--success-color);
}

.result-severity.severity-medium {
    background: var(--chip-bg-warning);
    color: var(--warning-color);
}

.result-severity.severity-high {
    background: var(--chip-bg-orange);
    color: #f97316;
}

.result-severity.severity-critical {
    background: var(--chip-bg-danger);
    color: var(--danger-color);
}

/* Project header summary */
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}
.project-header-main {
    flex: 1 1 auto;
    min-width: 0;
}
.project-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    align-items: center;
    margin: 0.25rem 0 0.5rem 0;
}
.project-header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.project-progress-compact { display: inline-flex; align-items: center; gap: 0.5rem; }
.project-progress-compact #projectProgressText { font-size: var(--font-size-base); color: var(--text-secondary); }
.progress-compact {
    width: 160px;
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--border-light);
}
.progress-compact-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.6s ease;
}
.due-chip {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    border: 1px solid transparent;
}
.due-chip.ok { background: var(--chip-bg-success); color: var(--success-color); border-color: var(--chip-br-success); }
.due-chip.soon { background: var(--chip-bg-warning); color: var(--warning-color); border-color: var(--chip-br-warning); }
.due-chip.overdue { background: var(--chip-bg-danger); color: var(--danger-color); border-color: var(--chip-br-danger); }

/* Enhanced Tab System */
.content-tabs {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.tab-nav {
    display: flex;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-light);
}

.tab-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.tab-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
}

.tab-btn.active {
    background: var(--bg-card);
    color: var(--primary-color);
    font-weight: 600;
}

.tab-btn .tab-count {
    margin-left: 0.5rem;
    padding: 0 0.5rem;
    border-radius: 999px;
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
}

.tab-btn.active::after {
    transform: scaleX(1);
}

.tab-content {
    min-height: 300px;
}

.tab-pane {
    display: none;
    padding: 1.5rem;
}

.tab-pane.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.section-header h3 {
    margin: 0;
    font-size: var(--font-size-large);
    font-weight: 600;
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .domains-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header .container {
        padding: 0 1rem;
    }

    .nav {
        gap: 0.25rem;
    }

    .nav-btn {
        padding: 0.5rem 0.75rem;
        font-size: var(--font-size-base);
    }

    .view-header h2 {
        font-size: var(--font-size-large);
    }

    .subtitle {
        font-size: var(--font-size-base);
        padding: 0 1rem;
    }

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

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

    .risk-matrix {
        flex-direction: column;
        gap: 1rem;
    }

    .tab-nav {
        flex-direction: column;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

/* Risk Management Styles */
.risk-card {
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    background: white;
    transition: box-shadow 0.2s ease;
}

.risk-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.risk-card.severity-low {
    border-left: 4px solid #28a745;
}

.risk-card.severity-medium {
    border-left: 4px solid #ffc107;
}

.risk-card.severity-high {
    border-left: 4px solid #fd7e14;
}

.risk-card.severity-critical {
    border-left: 4px solid #dc3545;
}

.risk-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.risk-header h4 {
    margin: 0;
    color: #333;
    font-size: var(--font-size-large);
}

.risk-severity {
    margin-left: 12px;
}

.severity-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: var(--font-size-base);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.severity-badge.low {
    background: #d4edda;
    color: #155724;
}

.severity-badge.medium {
    background: #fff3cd;
    color: #856404;
}

.severity-badge.high {
    background: #fde2e4;
    color: #721c24;
}

.severity-badge.critical {
    background: #f8d7da;
    color: #721c24;
}

.risk-description {
    color: #666;
    margin: 8px 0;
    line-height: 1.4;
}

.risk-matrix {
    display: flex;
    gap: 20px;
    margin: 12px 0;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.risk-factor {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.factor-label {
    font-size: var(--font-size-base);
    color: #666;
    font-weight: 500;
}

.factor-value {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: var(--font-size-base);
    font-weight: 500;
    text-transform: capitalize;
}

.factor-value.very-low {
    background: #d4edda;
    color: #155724;
}

.factor-value.low {
    background: #d1ecf1;
    color: #0c5460;
}

.factor-value.medium {
    background: #fff3cd;
    color: #856404;
}

.factor-value.high {
    background: #fde2e4;
    color: #721c24;
}

.factor-value.very-high {
    background: #f8d7da;
    color: #721c24;
}

.risk-mitigation {
    margin: 12px 0;
    padding: 8px;
    background: #e7f3ff;
    border-radius: 4px;
    border-left: 3px solid #007bff;
}

.risk-mitigation strong {
    color: #0056b3;
}

.risk-mitigation p {
    margin: 4px 0 0 0;
    color: #333;
}

.risk-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* Search result styles */
.result-type.risk {
    background: #fff3cd;
    color: #856404;
}

.result-severity {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: var(--font-size-base);
    font-weight: 500;
}

/* Help & Support Styles */
.help-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.help-section {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.help-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.help-section h3 {
    color: var(--primary-color);
    font-size: var(--font-size-large);
    font-weight: 600;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-section p {
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.help-section ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.help-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.help-section strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Footer Styles */
.app-footer {
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
    padding: 1.5rem 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.disclaimer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.disclaimer p {
    margin: 0;
    font-size: var(--font-size-base);
    line-height: 1.4;
    color: var(--text-secondary);
}

.disclaimer strong {
    color: var(--warning-color);
    font-weight: 600;
}

.footer-meta {
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.footer-meta p {
    margin: 0;
    font-size: var(--font-size-base);
    color: var(--text-muted);
    font-weight: 500;
}

/* Mobile responsiveness for help content and footer */
@media (max-width: 768px) {
    .help-content {
        padding: 0 0.5rem;
    }

    .help-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .help-section h3 {
        font-size: var(--font-size-large);
    }

    .footer-content {
        padding: 0 1rem;
    }

    .disclaimer {
        text-align: center;
    }
}

/* Local Storage Info Card */
.data-card-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.data-card-info h3 {
    color: var(--info-color);
}

.storage-info-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.storage-info-list li {
    padding: 0.35rem 0;
    font-size: var(--font-size-base);
    color: var(--text-secondary);
}

.data-trends {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.trend-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.trend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.trend-label {
    margin: 0;
    font-size: var(--font-size-base);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.trend-period,
.trend-value {
    margin: 0.15rem 0 0;
    font-weight: 600;
    color: var(--text-primary);
}

.trend-value {
    font-size: var(--font-size-base);
    color: var(--info-color);
}

.trend-change {
    font-size: var(--font-size-base);
    color: var(--info-color);
    font-weight: 600;
}

.trend-sparkline {
    display: flex;
    align-items: flex-end;
    gap: 0.35rem;
    height: 60px;
    margin-top: 0.75rem;
}

.spark-bar {
    flex: 1;
    min-height: 4px;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.9), rgba(59, 130, 246, 0.35));
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    position: relative;
    transition: opacity 0.2s ease;
}

.spark-bar span {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, -0.4rem);
    font-size: var(--font-size-base);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    padding: 0.15rem 0.35rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.spark-bar:hover span {
    opacity: 1;
}

.trend-subtext {
    margin: 0.75rem 0 0;
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    line-height: 1.4;
}

.trend-change.trend-up {
    color: var(--danger-color);
}

.trend-change.trend-down {
    color: var(--success-color);
}

.trend-empty {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    width: 100%;
    text-align: center;
}

/* Welcome Modal Privacy Note */
.welcome-privacy-note {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
}

.welcome-privacy-note p {
    margin: 0;
    font-size: var(--font-size-base);
    color: var(--text-secondary);
}

.welcome-preference {
    margin: 0 1.5rem 1.25rem;
}

.welcome-preference label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    cursor: pointer;
}

.welcome-preference input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary-color);
}

/* Toast Notification System */
.notification-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
}

.notification {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.notification-show {
    opacity: 1;
    transform: translateX(0);
}

.notification-hide {
    opacity: 0;
    transform: translateX(100%);
}

.notification-icon {
    font-size: var(--font-size-base);
    flex-shrink: 0;
}

.notification-message {
    flex: 1;
    font-size: var(--font-size-base);
    line-height: 1.4;
    color: var(--text-primary);
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: var(--font-size-base);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.notification-close:hover {
    color: var(--text-primary);
}

.notification-success {
    border-color: var(--success-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), var(--bg-elevated));
}

.notification-success .notification-icon {
    color: var(--success-color);
}

.notification-error {
    border-color: var(--danger-color);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), var(--bg-elevated));
}

.notification-error .notification-icon {
    color: var(--danger-color);
}

.notification-warning {
    border-color: var(--warning-color);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), var(--bg-elevated));
}

.notification-warning .notification-icon {
    color: var(--warning-color);
}

.notification-info {
    border-color: var(--info-color);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), var(--bg-elevated));
}

.notification-info .notification-icon {
    color: var(--info-color);
}

@media (max-width: 480px) {
    .notification-container {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
}

.welcome-privacy-note strong {
    color: var(--success-color);
}
