/* ============================================
   PRINT STYLES — PDF Export via window.print()
   Ultra-modern medical report layout
   ============================================ */

/* ─── Page Setup ──────────────────────────────── */
@page {
    size: A4;
    margin: 18mm 16mm 20mm 16mm;
}

@page :first {
    margin-top: 0;
}

/* ─── Global Print Defaults ─────────────────── */
@media print {
    *,
    *::before,
    *::after {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    body {
        background: white !important;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
        font-size: 10pt;
        color: #0f172a;
        line-height: 1.6;
        -webkit-font-smoothing: antialiased;
    }

    /* ─── Hide all interactive / non-print UI ─── */
    .header,
    .toast-container,
    .modal-overlay,
    .analyze-btn-container,
    .flow-context-bar,
    .flow-action-bar,
    .wizard-bar,
    .error-banner,
    .unsaved-banner,
    .no-print,
    .report-mode-toggle,
    #generate-section,
    #labs-toggle-btn,
    .refinement-panel,
    .ai-spinner,
    .gate-spinner,
    .btn,
    .tab,
    .hidden {
        display: none !important;
    }

    .main-content {
        padding: 0;
        max-width: 100%;
        margin: 0;
    }

    /* Force color printing for all status elements */
    .badge, .lab-card-pill, .marker-dot,
    .stat-card, .system-card, .gauge-svg, .gauge-dot,
    .lab-card, .lab-card::before {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Cards — clean print look */
    .card, .lab-card, .system-card, .analysis-section, .stat-card {
        box-shadow: none !important;
        break-inside: avoid;
    }

    [contenteditable="true"] {
        border: none !important;
        outline: none !important;
        background: transparent !important;
    }

    .review-columns {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .review-column {
        max-height: none;
        overflow: visible;
        break-inside: avoid;
    }
}

/* ============================================
   TARGETED PRINT: body.printing-report
   ============================================ */

body.printing-report .header,
body.printing-report .flow-context-bar,
body.printing-report .wizard-bar,
body.printing-report .no-print,
body.printing-report .report-mode-toggle,
body.printing-report #generate-section,
body.printing-report #labs-toggle-btn {
    display: none !important;
}

body.printing-report .report-sticky-bar {
    position: static;
    box-shadow: none;
    border-bottom: 2px solid #333;
    padding: 12px 0;
}

body.printing-report .report-sticky-bar .btn,
body.printing-report .report-sticky-bar .report-mode-toggle {
    display: none !important;
}

body.printing-report .report-document-mode {
    background: white;
    min-height: auto;
}

body.printing-report .report-document-content {
    max-width: 100%;
    margin: 0;
    padding: 20px 0;
    background: white;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

body.printing-report .report-document-content .tabs,
body.printing-report .report-document-content .tab,
body.printing-report .report-tab-row,
body.printing-report .report-lang-row,
body.printing-report .report-actions .edit-status,
body.printing-report .report-actions .btn {
    display: none !important;
}

body.printing-report .report-body {
    padding: 0;
}

body.printing-report .report-body [contenteditable] {
    border: none;
    outline: none;
    background: transparent;
}


/* ============================================
   MULTI-TAB PRINT: body.printing-all-tabs
   ============================================ */

/* Print container defaults to hidden */
.print-all-tabs {
    display: none;
}

body.printing-all-tabs .app,
body.printing-all-tabs .header,
body.printing-all-tabs .report-document-mode,
body.printing-all-tabs .main-content,
body.printing-all-tabs .flow-context-bar {
    display: none !important;
}

body.printing-all-tabs .print-all-tabs {
    display: block !important;
}

@media print {
    .print-all-tabs {
        display: block !important;
    }
}


/* ─────────────────────────────────────────────
   COVER PAGE
   ───────────────────────────────────────────── */

.print-cover {
    page-break-after: always;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 40px;
    box-sizing: border-box;
}

/* Top accent stripe */
.print-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #1e293b, #334155, #d97706);
}

/* Subtle decorative element */
.print-cover::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 1px solid rgba(30, 41, 59, 0.06);
    pointer-events: none;
}

.print-cover-brand {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11pt;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #1e293b;
    margin-bottom: 40px;
}

.print-cover-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d97706, transparent);
    margin: 0 auto 40px;
}

.print-cover-type {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14pt;
    font-weight: 400;
    color: #475569;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.print-cover-patient {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 32pt;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 20px;
}

.print-cover-meta {
    font-family: 'Inter', sans-serif;
    font-size: 10pt;
    color: #94a3b8;
    line-height: 1.8;
}

.print-cover-meta span {
    display: block;
}

/* Footer on cover page */
.print-cover-footer {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    text-align: center;
}

.print-cover-footer-line {
    width: 40px;
    height: 1px;
    background: #e2e8f0;
    margin: 0 auto 12px;
}

.print-cover-footer-text {
    font-family: 'Inter', sans-serif;
    font-size: 8pt;
    color: #94a3b8;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}


/* ─────────────────────────────────────────────
   PAGE HEADER (repeats on each page)
   ───────────────────────────────────────────── */

.print-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.print-page-header-brand {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 8pt;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: 0.08em;
}

.print-page-header-patient {
    font-family: 'Inter', sans-serif;
    font-size: 8pt;
    color: #94a3b8;
}


/* ─────────────────────────────────────────────
   SECTION PAGES
   ───────────────────────────────────────────── */

.print-section {
    page-break-before: always;
    padding: 0;
}

/* Section title — modern left-accent style */
.print-section-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 18pt;
    font-weight: 700;
    color: #1e293b;
    padding: 0 0 12px 0;
    margin-bottom: 28px;
    border-bottom: 2px solid #1e293b;
    letter-spacing: -0.02em;
    position: relative;
}

/* Thin accent underline */
.print-section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: #d97706;
}


/* ─────────────────────────────────────────────
   LAB RESULTS SECTION
   ───────────────────────────────────────────── */

/* Stats row — compact overview pills */
.print-section .stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 28px;
}

.print-section .stat-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    text-align: center;
    background: white;
}

.print-section .stat-card.optimal {
    border-color: rgba(45, 139, 85, 0.3);
    background: rgba(45, 139, 85, 0.04);
}

.print-section .stat-card.suboptimal {
    border-color: rgba(196, 144, 32, 0.3);
    background: rgba(196, 144, 32, 0.04);
}

.print-section .stat-card.critical {
    border-color: rgba(192, 68, 62, 0.3);
    background: rgba(192, 68, 62, 0.04);
}

/* System overview cards */
.print-section .grid-5 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 28px;
}

.print-section .system-card {
    border-radius: 8px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    background: white;
    break-inside: avoid;
}

.print-section .system-card.good {
    border-left: 3px solid #2D8B55;
}

.print-section .system-card.attention {
    border-left: 3px solid #C49020;
}

.print-section .system-card.concern {
    border-left: 3px solid #C0443E;
}

/* Detailed lab cards grid */
.print-section .lab-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.print-section .lab-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    background: white;
    break-inside: avoid;
}

.print-section .section-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12pt;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}


/* ─────────────────────────────────────────────
   ANALYSIS TEXT SECTIONS
   (Blood Analysis, Intake Analysis, Combined)
   ───────────────────────────────────────────── */

.print-section .report-body {
    padding: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 10pt;
    line-height: 1.75;
    color: #0f172a;
}

/* Heading hierarchy */
.print-section .report-body h1 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 18pt;
    font-weight: 700;
    color: #1e293b;
    margin: 28px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
    letter-spacing: -0.01em;
    page-break-after: avoid;
}

.print-section .report-body h2 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15pt;
    font-weight: 700;
    color: #1e293b;
    margin: 24px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f1f5f9;
    letter-spacing: -0.01em;
    page-break-after: avoid;
}

.print-section .report-body h3 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13pt;
    font-weight: 600;
    color: #334155;
    margin: 22px 0 10px;
    page-break-after: avoid;
}

.print-section .report-body h4 {
    font-family: 'Inter', sans-serif;
    font-size: 11pt;
    font-weight: 600;
    color: #0f172a;
    margin: 18px 0 8px;
    page-break-after: avoid;
}

.print-section .report-body h5 {
    font-family: 'Inter', sans-serif;
    font-size: 10pt;
    font-weight: 600;
    color: #475569;
    margin: 14px 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    page-break-after: avoid;
}

/* Paragraphs */
.print-section .report-body p {
    margin: 0 0 10px;
    orphans: 3;
    widows: 3;
}

/* First paragraph after heading — no top margin */
.print-section .report-body h1 + p,
.print-section .report-body h2 + p,
.print-section .report-body h3 + p,
.print-section .report-body h4 + p {
    margin-top: 0;
}

/* Lists */
.print-section .report-body ul,
.print-section .report-body ol {
    margin: 0 0 14px;
    padding-left: 22px;
}

.print-section .report-body li {
    margin-bottom: 5px;
    line-height: 1.65;
}

.print-section .report-body li::marker {
    color: #1e293b;
}

/* Nested lists */
.print-section .report-body li > ul,
.print-section .report-body li > ol {
    margin-top: 4px;
    margin-bottom: 4px;
}

/* Bold and emphasis */
.print-section .report-body strong {
    font-weight: 600;
    color: #0f172a;
}

.print-section .report-body em {
    font-style: italic;
    color: #475569;
}

/* Blockquotes — used for recommendations / key insights */
.print-section .report-body blockquote {
    margin: 16px 0;
    padding: 14px 18px;
    border-left: 3px solid #1e293b;
    background: rgba(30, 41, 59, 0.03);
    border-radius: 0 6px 6px 0;
    font-size: 10pt;
    color: #2C3E35;
}

.print-section .report-body blockquote p:last-child {
    margin-bottom: 0;
}

/* Tables */
.print-section .report-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 9pt;
    break-inside: avoid;
}

.print-section .report-body th {
    background: #f1f5f9;
    font-weight: 600;
    text-align: left;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    font-size: 9pt;
    color: #1e293b;
}

.print-section .report-body td {
    padding: 7px 12px;
    border: 1px solid #e2e8f0;
    vertical-align: top;
}

.print-section .report-body tr:nth-child(even) td {
    background: rgba(242, 237, 230, 0.4);
}

/* Horizontal rules */
.print-section .report-body hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    margin: 24px 0;
}

/* Code / inline markers */
.print-section .report-body code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 9pt;
    background: #f1f5f9;
    padding: 1px 5px;
    border-radius: 3px;
    color: #1e293b;
}


/* ─────────────────────────────────────────────
   SIGNATURE FOOTER
   ───────────────────────────────────────────── */

.print-signature {
    margin-top: 50px;
    padding-top: 24px;
    border-top: 2px solid #1e293b;
    position: relative;
}

.print-signature::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: #d97706;
}

.print-signature-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.print-signature-left {
    font-family: 'Inter', sans-serif;
}

.print-signature-name {
    font-size: 12pt;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 2px;
}

.print-signature-role {
    font-size: 9pt;
    color: #94a3b8;
}

.print-signature-right {
    text-align: right;
}

.print-signature-brand {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11pt;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}

.print-signature-url {
    font-size: 8pt;
    color: #94a3b8;
    letter-spacing: 0.03em;
}


/* ─────────────────────────────────────────────
   DISCLAIMER FOOTER
   ───────────────────────────────────────────── */

.print-disclaimer {
    margin-top: 30px;
    padding: 14px 18px;
    background: #F9F7F4;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 7.5pt;
    color: #94a3b8;
    line-height: 1.5;
    text-align: center;
}


/* ─────────────────────────────────────────────
   LEGACY COMPAT — keep old classes working
   ───────────────────────────────────────────── */

.print-report-header {
    display: none;
}

.print-report-title,
.print-report-patient,
.print-report-date {
    display: none;
}


/* ────────────────────────────────────────────
   TREATMENT PLAN PRINT
   body.printing-treatment
   ──────────────────────────────────────────── */

body.printing-treatment .header,
body.printing-treatment .flow-context-bar,
body.printing-treatment .treat-part-nav,
body.printing-treatment .treat-mode-toggle,
body.printing-treatment .treat-action-bar,
body.printing-treatment .treat-generate-section,
body.printing-treatment .treat-part-transition,
body.printing-treatment .treat-improve-slot,
body.printing-treatment .refinement-panel,
body.printing-treatment .unsaved-banner,
body.printing-treatment .toast-container {
    display: none !important;
}

body.printing-treatment .main-content {
    padding: 0;
    margin: 0;
}

body.printing-treatment .treat-part-section {
    break-inside: avoid-page;
    page-break-inside: avoid;
    margin-bottom: 24pt;
}

body.printing-treatment .treat-section-header {
    break-after: avoid;
    page-break-after: avoid;
}

body.printing-treatment .treat-supplement-table {
    break-inside: avoid;
    page-break-inside: avoid;
    font-size: 9pt;
}

body.printing-treatment .treat-recipe-card {
    break-inside: avoid;
    page-break-inside: avoid;
}

body.printing-treatment .treat-meal-block {
    break-inside: avoid;
    page-break-inside: avoid;
}

body.printing-treatment .treat-checklist {
    break-inside: avoid;
    page-break-inside: avoid;
}


/* ────────────────────────────────────────────
   TREATMENT PLAN — Summary Cards in Print
   ──────────────────────────────────────────── */

/* Cards grid — 2 or 3 column layout for print */
.print-treatment-doc .treat-cards-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.print-treatment-doc .treat-cards-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.print-treatment-doc .treat-cards-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.print-treatment-doc .treat-cards-grid .full-width {
    grid-column: 1 / -1;
}

.print-treatment-doc .treat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.print-treatment-doc .treat-card h3 {
    font-size: 10pt;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
}

.print-treatment-doc .treat-card ul {
    list-style: disc;
    padding-left: 18px;
    margin: 0;
}

.print-treatment-doc .treat-card ul li {
    font-size: 9pt;
    color: #334155;
    padding: 2px 0;
    line-height: 1.5;
}

/* Border top color variants */
.print-treatment-doc .treat-card.border-top-blue { border-top: 3px solid #3b82f6; }
.print-treatment-doc .treat-card.border-top-amber { border-top: 3px solid #d97706; }
.print-treatment-doc .treat-card.border-top-green { border-top: 3px solid #22c55e; }

/* Food classification columns */
.print-treatment-doc .treat-food-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.print-treatment-doc .treat-food-col h4 {
    font-size: 10pt;
    font-weight: 700;
    margin-bottom: 6px;
}

.print-treatment-doc .treat-food-col h4.prioritize { color: #15803d; }
.print-treatment-doc .treat-food-col h4.eliminate { color: #b91c1c; }

.print-treatment-doc .treat-food-col ul {
    list-style: disc;
    padding-left: 18px;
    margin: 0;
}

.print-treatment-doc .treat-food-col li {
    font-size: 9pt;
    color: #334155;
    padding: 2px 0;
}

/* Supplement table in print */
.print-treatment-doc .treat-supplement-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9pt;
    margin-bottom: 16px;
    break-inside: avoid;
}

.print-treatment-doc .treat-supplement-table th {
    background: #f1f5f9;
    padding: 6px 10px;
    text-align: left;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}

.print-treatment-doc .treat-supplement-table td {
    padding: 5px 10px;
    border: 1px solid #e2e8f0;
}

/* Wind-down protocol */
.print-treatment-doc .treat-wind-down {
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    break-inside: avoid;
}

.print-treatment-doc .treat-wind-down h3 {
    font-size: 11pt;
    font-weight: 700;
    margin-bottom: 12px;
}

.print-treatment-doc .treat-wind-down-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 9pt;
}

.print-treatment-doc .treat-wind-down-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 9pt;
    flex-shrink: 0;
    background: #ede9fe;
    color: #6d28d9;
}


/* ────────────────────────────────────────────
   EXECUTIVE SUMMARY in Print
   ──────────────────────────────────────────── */

.print-exec-summary .exec-scores-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.print-exec-summary .exec-score-widget {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 12px 12px;
    text-align: center;
    background: #fff;
    break-inside: avoid;
}

.print-exec-summary .exec-score-label {
    font-size: 8pt;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.print-exec-summary .exec-score-value {
    font-size: 24pt;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 10px;
}

.print-exec-summary .score-green .exec-score-value { color: #16a34a; }
.print-exec-summary .score-blue .exec-score-value { color: #2563eb; }
.print-exec-summary .score-amber .exec-score-value { color: #d97706; }
.print-exec-summary .score-red .exec-score-value { color: #dc2626; }

.print-exec-summary .exec-score-bar {
    height: 5px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}

.print-exec-summary .exec-score-bar-fill {
    height: 100%;
    border-radius: 3px;
}

.print-exec-summary .score-green .exec-score-bar-fill { background: #16a34a; }
.print-exec-summary .score-blue .exec-score-bar-fill { background: #2563eb; }
.print-exec-summary .score-amber .exec-score-bar-fill { background: #d97706; }
.print-exec-summary .score-red .exec-score-bar-fill { background: #dc2626; }

/* Start / Stop Doing in print */
.print-exec-summary .exec-do-stop-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.print-exec-summary .exec-do-card {
    border-radius: 10px;
    padding: 16px;
    break-inside: avoid;
}

.print-exec-summary .exec-start-card {
    background: rgba(240, 253, 244, 0.7);
    border: 1px solid #bbf7d0;
}

.print-exec-summary .exec-stop-card {
    background: rgba(254, 242, 242, 0.7);
    border: 1px solid #fecaca;
}

.print-exec-summary .exec-do-card h3 {
    font-size: 11pt;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.print-exec-summary .exec-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.print-exec-summary .exec-dot.green { background: #22c55e; }
.print-exec-summary .exec-dot.red { background: #f87171; }

.print-exec-summary .exec-do-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.print-exec-summary .exec-do-card li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 0;
    font-size: 9pt;
    color: #334155;
    line-height: 1.5;
}

.print-exec-summary .exec-check { color: #16a34a; font-weight: 700; }
.print-exec-summary .exec-cross { color: #dc2626; font-weight: 700; }

/* Timeline in print */
.print-exec-summary .exec-timeline-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    break-inside: avoid;
}

.print-exec-summary .exec-timeline-card h3 {
    font-size: 11pt;
    font-weight: 700;
    margin-bottom: 16px;
}

.print-exec-summary .exec-timeline {
    position: relative;
    padding-left: 44px;
}

.print-exec-summary .exec-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 16px;
    bottom: 16px;
    width: 2px;
    background: #e2e8f0;
}

.print-exec-summary .exec-timeline-step {
    position: relative;
    padding-bottom: 18px;
}

.print-exec-summary .exec-timeline-step:last-child {
    padding-bottom: 0;
}

.print-exec-summary .exec-timeline-icon {
    position: absolute;
    left: -44px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #d97706;
    background: #fffbeb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9pt;
    z-index: 1;
}

.print-exec-summary .exec-timeline-content strong {
    font-size: 10pt;
    font-weight: 700;
    color: #1e293b;
}

.print-exec-summary .exec-timeline-content p {
    margin: 2px 0 0;
    font-size: 9pt;
    color: #64748b;
}


/* ────────────────────────────────────────────
   SECTION TITLE COLOR ACCENTS
   ──────────────────────────────────────────── */

.print-section-nutrition::after { background: #22c55e; }
.print-section-movement::after { background: #3b82f6; }
.print-section-sleep::after { background: #6366f1; }
.print-section-supplements::after { background: #d97706; }
.print-section-stress::after { background: #ec4899; }
.print-section-environment::after { background: #06b6d4; }

/* ────────────────────────────────────────────
   PATIENT PORTAL — Hide sidebar when printing
   ──────────────────────────────────────────── */

body.printing-report .patient-portal-sidebar,
body.printing-all-tabs .patient-portal-sidebar {
    display: none !important;
}

body.printing-report .patient-portal-content,
body.printing-all-tabs .patient-portal-content {
    padding: 0;
    max-width: 100%;
}

body.printing-report .patient-portal,
body.printing-all-tabs .patient-portal {
    display: block;
}

/* ─── Combined Report Template Print ──────────────── */
.combined-report-template {
    max-width: 100%;
}

.crt-hormones {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.crt-system {
    break-inside: avoid;
}

.crt-short-summary {
    break-inside: avoid;
}

.crt-system-1, .crt-system-2, .crt-system-3, .crt-system-4, .crt-system-5 {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}
