/* ============================================
   NIS2 Assessment Tool - Professional Theme
   ============================================ */

:root {
    --primary: #1a56db;
    --primary-dark: #1240a8;
    --primary-light: #e8eeff;
    --accent: #0ea5e9;
    --success: #198754;
    --warning: #ffc107;
    --danger: #dc3545;
    --sidebar-width: 280px;
    --navbar-height: 56px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --heatmap-1: #dc3545;
    --heatmap-2: #fd7e14;
    --heatmap-3: #ffc107;
    --heatmap-4: #20c997;
    --heatmap-5: #198754;
    --heatmap-0: #e9ecef;
}

[data-bs-theme="dark"] {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #1e293b;
    --accent: #38bdf8;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #f87171;
    --heatmap-0: #374151;
    --heatmap-1: #f87171;
    --heatmap-2: #fb923c;
    --heatmap-3: #fbbf24;
    --heatmap-4: #34d399;
    --heatmap-5: #22c55e;
}

* {
    font-family: var(--font-family);
}

body {
    background: #f4f6f9;
    min-height: 100vh;
    overflow-x: hidden;
}

[data-bs-theme="dark"] body {
    background: #0f172a;
}

/* Global card overrides */
.card {
    border-radius: 16px !important;
    border-color: #e5e7eb;
}

.card-header {
    border-radius: 16px 16px 0 0 !important;
    background: transparent !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    padding: 1rem 1.5rem !important;
    font-weight: 600;
}

[data-bs-theme="dark"] .card {
    background: #1e293b;
    border-color: #334155;
}

[data-bs-theme="dark"] .card-header {
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

/* ── Auth Screen — Split Layout ───────────────────────────── */
.auth-split-container {
    display: flex;
    min-height: 100vh;
}

/* Left brand panel */
.auth-brand-panel {
    flex: 0 0 420px;
    background: linear-gradient(160deg, #1a56db 0%, #084298 60%, #042563 100%);
    padding: 3rem;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.auth-brand-panel::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.auth-brand-panel::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.auth-brand-logo {
    position: relative;
    z-index: 1;
}

.auth-brand-icon {
    font-size: 3rem;
    opacity: 0.95;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.auth-brand-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.auth-brand-subtitle {
    font-size: 0.95rem;
    opacity: 0.75;
    line-height: 1.5;
    margin-top: 0.75rem;
    position: relative;
    z-index: 1;
}

.auth-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    position: relative;
    z-index: 1;
}

.auth-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.4;
    opacity: 0.9;
}

.auth-feature-icon {
    width: 22px;
    flex-shrink: 0;
    color: #93c5fd;
    margin-top: 1px;
}

/* Right form panel */
.auth-form-panel {
    flex: 1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
}

.auth-form-inner {
    width: 100%;
    max-width: 420px;
}

.auth-form-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #111827;
    margin-bottom: 0.25rem;
}

.auth-form-subtitle {
    font-size: 0.9rem;
}

/* Auth tabs — underline style */
.auth-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
}

.auth-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 0;
}

.auth-tab:hover {
    color: var(--primary);
}

.auth-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Auth divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* Auth icon (mobile) */
.auth-icon-wrapper {
    font-size: 42px;
    color: #0d6efd;
}

/* Guest button */
.auth-guest-btn {
    border: 2px solid #e5e7eb !important;
    color: #374151 !important;
    background: #f9fafb !important;
    font-weight: 600;
    line-height: 1.3;
}

.auth-guest-btn:hover {
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
    color: #111827 !important;
}

/* Auth screen mobile (full form panel) */
@media (max-width: 991px) {
    .auth-form-panel {
        min-height: 100vh;
        padding: 2rem 1.5rem;
    }
}

/* Navbar */
.bg-primary-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
}

.navbar-brand {
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

/* Layout */
.main-container {
    display: flex;
    margin-top: var(--navbar-height);
    min-height: calc(100vh - var(--navbar-height));
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid #e5e7eb;
    padding: 1.25rem;
    position: fixed;
    top: var(--navbar-height);
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}

[data-bs-theme="dark"] .sidebar {
    background: #1e293b;
    border-right-color: #334155;
}

.sidebar-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

[data-bs-theme="dark"] .sidebar-header {
    border-bottom-color: #334155;
}

.progress-bar-container {
    padding-right: 0.25rem;
}

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

.step-nav-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.75rem;
    margin-bottom: 2px;
    border-radius: 10px;
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    line-height: 1.3;
    color: #6b7280;
    gap: 0.65rem;
}

.step-nav-item:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
}

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

.step-nav-item.completed {
    color: var(--success);
}

.step-nav-item.completed:hover {
    border-left-color: var(--success);
}

.step-nav-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
    background: #e5e7eb;
    color: #9ca3af;
    font-weight: 700;
    transition: all 0.2s;
}

.step-nav-item.active .step-nav-icon {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26, 86, 219, 0.35);
}

.step-nav-item.completed .step-nav-icon {
    background: var(--success);
    color: #fff;
}

/* Content Area */
.content-area {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem 2.5rem 5rem;
    max-width: calc(100% - var(--sidebar-width));
}

/* Wizard Steps */
.wizard-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.wizard-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

/* Step Header */
.step-header {
    margin-bottom: 1.75rem;
}

.step-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid rgba(26, 86, 219, 0.15);
}

.step-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    letter-spacing: -0.02em;
}

/* Welcome Hero */
.welcome-hero {
    max-width: 900px;
    margin: 0 auto;
}

.hero-icon {
    font-size: 4rem;
    color: var(--primary);
    width: 120px;
    height: 120px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.feature-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .feature-card {
    background: #1e293b;
    border-color: #334155;
}

/* Classification Boxes */
.classification-box {
    background: var(--primary-light);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}

.classification-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.classification-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
}

/* Assessment Question Cards */
.question-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.question-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.question-card.answered {
    border-left: 4px solid var(--success);
}

[data-bs-theme="dark"] .question-card {
    background: #1e293b;
    border-color: #334155;
}

.question-number {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.question-text {
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    line-height: 1.45;
}

.question-help {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 0.75rem;
    font-style: italic;
}

/* Maturity Rating */
.maturity-rating {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.maturity-option {
    flex: 1;
    min-width: 90px;
    text-align: center;
    padding: 0.5rem 0.4rem;
    border: 2px solid #e5e7eb;
    border-color: var(--opt-border, #e5e7eb);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.78rem;
    background: var(--opt-bg, transparent);
    position: relative;
}

.maturity-option:hover {
    border-color: var(--opt-sel, var(--primary));
    background: var(--opt-bg, var(--primary-light));
    filter: brightness(0.95);
}

.maturity-option.selected {
    border-color: var(--opt-sel, var(--primary));
    background: var(--opt-sel, var(--primary));
    color: var(--opt-sel-text, #fff);
    font-weight: 600;
}

/* Per-level color tokens */
.maturity-option[data-level="1"] {
    --opt-bg: #fef2f2;
    --opt-border: #fca5a5;
    --opt-sel: #dc3545;
    --opt-sel-text: #fff;
}

.maturity-option[data-level="2"] {
    --opt-bg: #fff7ed;
    --opt-border: #fdba74;
    --opt-sel: #f97316;
    --opt-sel-text: #fff;
}

.maturity-option[data-level="3"] {
    --opt-bg: #fefce8;
    --opt-border: #fde68a;
    --opt-sel: #eab308;
    --opt-sel-text: #1f2937;
}

.maturity-option[data-level="4"] {
    --opt-bg: #f0fdf4;
    --opt-border: #6ee7b7;
    --opt-sel: #10b981;
    --opt-sel-text: #fff;
}

.maturity-option[data-level="5"] {
    --opt-bg: #dcfce7;
    --opt-border: #86efac;
    --opt-sel: #16a34a;
    --opt-sel-text: #fff;
}

/* Selected level indicator below question card */
.selected-level-indicator {
    min-height: 1.75rem;
    margin-top: 0.5rem;
    text-align: center;
}

.level-indicator-badge {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid transparent;
    animation: fadeIn 0.2s ease;
}

.level-indicator-badge.level-1 {
    background: #fef2f2;
    color: #dc3545;
    border-color: #fca5a5;
}

.level-indicator-badge.level-2 {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fdba74;
}

.level-indicator-badge.level-3 {
    background: #fefce8;
    color: #92400e;
    border-color: #fde68a;
}

.level-indicator-badge.level-4 {
    background: #f0fdf4;
    color: #059669;
    border-color: #6ee7b7;
}

.level-indicator-badge.level-5 {
    background: #dcfce7;
    color: #16a34a;
    border-color: #86efac;
}

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

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

.maturity-option .maturity-level {
    font-weight: 700;
    font-size: 1rem;
    display: block;
    margin-bottom: 2px;
}

.maturity-option .maturity-label {
    display: block;
    line-height: 1.2;
}

/* Domain Info Card */
.domain-info {
    background: var(--primary-light);
    border: none;
    border-left: 4px solid var(--primary);
    border-radius: 0 12px 12px 0;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

[data-bs-theme="dark"] .domain-info {
    background: #1e293b;
}

.domain-info .domain-article {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    font-weight: 600;
}

.domain-info .domain-desc {
    font-size: 0.9rem;
    color: #4b5563;
    margin-top: 0.25rem;
}

[data-bs-theme="dark"] .domain-info .domain-desc {
    color: #94a3b8;
}

/* Results - Score Cards */
.score-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s;
}

.score-card:hover {
    transform: translateY(-2px);
}

[data-bs-theme="dark"] .score-card {
    background: #1e293b;
    border-color: #334155;
}

.score-card .score-value {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
}

.score-card .score-label {
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.score-card .score-sublabel {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.15rem;
}

/* Score Ring Gauges */
.score-ring {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}

.score-ring-inner {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-bs-theme="dark"] .score-ring-inner {
    background: #1e293b;
}

.ring-value {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1;
}

/* Heat Map */
.heatmap-container {
    overflow-x: auto;
    padding: 1rem;
}

.heatmap-grid {
    display: grid;
    gap: 3px;
    min-width: 600px;
}

.heatmap-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
    cursor: default;
    transition: transform 0.15s;
    position: relative;
}

.heatmap-cell:hover {
    transform: scale(1.08);
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.heatmap-cell.header {
    background: transparent !important;
    color: #4b5563;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-align: center;
    line-height: 1.2;
    min-height: 52px;
    cursor: default;
    transform: none !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .heatmap-cell.header {
    color: #94a3b8;
}

.heatmap-cell.row-label {
    background: transparent !important;
    color: #1f2937;
    font-size: 0.8rem;
    font-weight: 600;
    justify-content: flex-start;
    padding-left: 0.5rem;
    cursor: default;
    transform: none !important;
    box-shadow: none !important;
    min-width: 180px;
}

[data-bs-theme="dark"] .heatmap-cell.row-label {
    color: #e2e8f0;
}

.heatmap-cell[data-score="1"] {
    background: var(--heatmap-1);
}

.heatmap-cell[data-score="2"] {
    background: var(--heatmap-2);
}

.heatmap-cell[data-score="3"] {
    background: var(--heatmap-3);
    color: #333;
}

.heatmap-cell[data-score="4"] {
    background: var(--heatmap-4);
}

.heatmap-cell[data-score="5"] {
    background: var(--heatmap-5);
}

.heatmap-cell[data-score="0"] {
    background: var(--heatmap-0);
    color: #9ca3af;
}

.heatmap-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #fff;
    padding: 0.4rem 0.65rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 400;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 10;
}

.heatmap-cell:hover .heatmap-tooltip {
    opacity: 1;
}

/* Heat Map Legend */
.heatmap-legend .legend-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
}

/* Gap Analysis Table */
#gapAnalysisTable th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#gapAnalysisTable td {
    vertical-align: middle;
}

.priority-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.priority-critical {
    background: #fef2f2;
    color: #dc2626;
}

.priority-high {
    background: #fff7ed;
    color: #ea580c;
}

.priority-medium {
    background: #fefce8;
    color: #ca8a04;
}

.priority-low {
    background: #f0fdf4;
    color: #16a34a;
}

[data-bs-theme="dark"] .priority-critical {
    background: #451a1a;
}

[data-bs-theme="dark"] .priority-high {
    background: #451a00;
}

[data-bs-theme="dark"] .priority-medium {
    background: #45400a;
}

[data-bs-theme="dark"] .priority-low {
    background: #0a3520;
}

/* Country Requirements */
.country-req-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.country-req-item:last-child {
    border-bottom: none;
}

.country-req-label {
    min-width: 180px;
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
}

.country-req-value {
    font-size: 0.875rem;
    color: #6b7280;
}

[data-bs-theme="dark"] .country-req-label {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .country-req-value {
    color: #94a3b8;
}

/* Wizard Navigation */
.wizard-nav {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    right: 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 0.75rem 2.5rem;
    display: flex;
    align-items: center;
    z-index: 100;
}

[data-bs-theme="dark"] .wizard-nav {
    background: #1e293b;
    border-top-color: #334155;
}

/* Responsive */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
        min-width: 260px;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .content-area {
        margin-left: 0;
        max-width: 100%;
        padding: 1.5rem 1rem 6rem;
    }

    .wizard-nav {
        left: 0;
        padding: 0.75rem 1rem;
    }

    .maturity-option {
        min-width: 70px;
        font-size: 0.72rem;
    }

    .maturity-option .maturity-label {
        display: none;
    }

    .welcome-hero .row {
        flex-direction: column;
        align-items: center;
    }

    .welcome-hero .col-md-3 {
        max-width: 280px;
    }
}

@media (max-width: 575px) {
    .heatmap-cell.row-label {
        min-width: 120px;
        font-size: 0.7rem;
    }

    .heatmap-cell {
        min-height: 34px;
        font-size: 0.75rem;
    }
}

/* ── Print / PDF export ─────────────────────────────────── */
/* Page setup for A4 portrait */
@page {
    size: A4 portrait;
    margin: 15mm 12mm;
}

@media print {

    /* Hide all chrome */
    .navbar,
    .sidebar,
    .wizard-nav,
    .btn,
    .toast-container,
    .autosave-indicator,
    #resultsProfileWarning,
    .auth-split-container {
        display: none !important;
    }

    /* Layout reset */
    body {
        background: #fff !important;
        font-size: 11pt;
    }

    .content-area {
        margin-left: 0 !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    /* Show only step 12 */
    .wizard-step {
        display: none !important;
    }

    .wizard-step[data-step="12"] {
        display: block !important;
    }

    /* Show the print header */
    .print-report-header {
        display: flex !important;
        justify-content: space-between;
        align-items: flex-start;
        border-bottom: 2px solid #1a56db;
        padding-bottom: 8pt;
        margin-bottom: 16pt;
    }

    .print-report-header .print-logo {
        font-size: 14pt;
        font-weight: 700;
        color: #1a56db;
    }

    .print-report-header .print-meta {
        font-size: 9pt;
        color: #4b5563;
        text-align: right;
        line-height: 1.6;
    }

    /* Cards: no shadows, clean borders */
    .card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #d1d5db !important;
    }

    .card-header {
        background: #f9fafb !important;
    }

    /* Page breaks */
    #scoreSummaryCards {
        page-break-after: always;
    }

    .heatmap-container {
        page-break-after: always;
    }

    /* Heatmap: disable hover transform */
    .heatmap-cell:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    /* Charts: canvas renders natively via bitmap */
    canvas {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Action plan: show collapsed section in print */
    #actionPlanCollapse {
        display: block !important;
    }

    .action-notes-row {
        display: table-row !important;
    }

    /* Snapshots: hide in print (not needed for static report) */
    #snapshotsCard {
        display: none !important;
    }
}

/* Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

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

.sidebar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

/* Utility */
.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Domain progress indicator */
.domain-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.domain-progress-text {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

/* Score gauge in results */
.gauge-container {
    width: 140px;
    height: 140px;
    margin: 0 auto;
    position: relative;
}

.gauge-container canvas {
    width: 100%;
    height: 100%;
}

.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
    font-weight: 800;
}

/* Animate score card values */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.score-animate {
    animation: countUp 0.5s ease-out;
}

/* ── Accessibility: keyboard focus indicators ─────────────── */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.maturity-option:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
    z-index: 1;
}

.step-nav-item:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: -2px;
}

/* ── Auto-save indicator ──────────────────────────────────── */
.autosave-indicator {
    position: fixed;
    bottom: 70px;
    right: 16px;
    font-size: 0.72rem;
    color: #6b7280;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 99;
}

.autosave-indicator.visible {
    opacity: 1;
}

/* ── Snapshots Section ────────────────────────────── */
#snapshotsCard .card-header button.btn-link {
    color: inherit;
}

#snapshotsCard .card-header button.btn-link:hover {
    color: var(--primary);
}

#snapshotsChevron {
    transition: transform 0.25s ease;
}

/* ── Action Plan Section ──────────────────────────── */
#actionPlanCard .card-header button.btn-link {
    color: inherit;
}

#actionPlanCard .card-header button.btn-link:hover {
    color: var(--primary);
}

#actionPlanChevron {
    transition: transform 0.25s ease;
}

.action-plan-row td {
    vertical-align: middle;
    font-size: 0.875rem;
}

.action-notes-row td {
    background: var(--primary-light);
    border-top: none !important;
}

[data-bs-theme="dark"] .action-notes-row td {
    background: #1a2535;
}

.action-rec-text {
    color: #4b5563;
    line-height: 1.4;
}

[data-bs-theme="dark"] .action-rec-text {
    color: #94a3b8;
}

/* Subtle ghost button for notes toggle */
.btn-ghost {
    background: transparent;
    border: none;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.btn-ghost:hover {
    background: var(--primary-light);
}

/* Action plan badge in header */
#actionPlanBadge {
    font-size: 0.72rem !important;
    vertical-align: middle;
}

/* Action plan toolbar */
#actionPlanToolbar {
    background: var(--card-bg, #fff);
    border-radius: 0 0 8px 8px;
}

[data-bs-theme="dark"] #actionPlanToolbar {
    background: #1e2a3a;
}

#actionPlanLastSaved {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Action plan history container */
#actionPlanHistoryContainer {
    border-top: 1px solid rgba(0, 0, 0, 0.07);
}

/* Gap Analysis — inline notes row */
.gap-notes-row td {
    background: var(--primary-light, #f0f4ff);
    border-top: none !important;
}

[data-bs-theme="dark"] .gap-notes-row td {
    background: #1a2535;
}