/* ==============================================================================
   A4 Executive Audit Report Stylesheet (Exact Reference Fidelity)
   ============================================================================== */

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

:root {
    --report-bg: #f8fafc;
    --page-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --primary-blue: #2563eb;
    --primary-navy: #0f172a;
    --accent-blue-bg: #eff6ff;
    --accent-blue-border: #bfdbfe;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    
    --score-green: #10b981;
    --score-blue: #2563eb;
    --score-amber: #f59e0b;
    --score-red: #ef4444;
}

/* Document Container */
.report-document {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background: var(--report-bg);
}

/* Individual A4 Page Box */
.report-page {
    position: relative;
    background: var(--page-bg);
    width: 100%;
    min-height: 1240px; /* A4 aspect ratio */
    margin: 0 auto 30px auto;
    padding: 36px 44px 50px 44px;
    box-sizing: border-box;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 4px;
}

/* Print Rules */
@media print {
    body {
        margin: 0;
        padding: 0;
        background: #ffffff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .no-print, .dashboard-sidebar, .top-header, .btn-action, .report-actions-bar {
        display: none !important;
    }
    .report-document {
        max-width: 100% !important;
        margin: 0 !important;
        background: transparent !important;
    }
    .report-page {
        box-shadow: none !important;
        margin: 0 !important;
        padding: 30px 40px !important;
        page-break-after: always !important;
        break-after: page !important;
        min-height: 100vh !important;
        height: 100% !important;
        border-radius: 0 !important;
    }
    .report-page:last-child {
        page-break-after: auto !important;
        break-after: auto !important;
    }
}

/* Page 1 - Top Bar */
.page1-topbar {
    background: #0f172a;
    color: #ffffff;
    margin: -36px -44px 24px -44px;
    padding: 20px 44px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}
.brand-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.brand-logo-shield {
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.brand-logo-shield.mini {
    color: #0f172a;
}
.brand-name {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.5px;
    font-family: 'Outfit', sans-serif;
}
.brand-tagline {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 1px;
}
.brand-right {
    text-align: right;
}
.prep-text {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #f1f5f9;
}
.prep-date {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

/* Page 1 - Title Banner */
.page1-title-banner {
    background: #0f172a;
    color: #ffffff;
    margin: -24px -44px 28px -44px;
    padding: 0 44px 28px 44px;
    border-bottom: 1px solid #1e293b;
}
.main-report-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 8px 0;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.3px;
    color: #ffffff;
}
.main-report-subtitle {
    font-size: 13px;
    color: #cbd5e1;
    margin: 0;
    font-weight: 400;
}

/* Page 1 - Company Box */
.page1-company-box {
    margin-bottom: 20px;
}
.company-heading {
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 4px 0;
    font-family: 'Outfit', sans-serif;
}
.company-subheading {
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
}

/* Contact Info Table */
.company-details-table {
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    padding: 12px 0;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.detail-row {
    display: flex;
    font-size: 12px;
}
.detail-label {
    width: 170px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.4px;
}
.detail-value {
    color: #1e293b;
    font-weight: 500;
}

/* Executive Summary Box */
.exec-summary-wrapper {
    margin-bottom: 26px;
}
.pill-badge {
    display: inline-block;
    padding: 6px 14px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.6px;
    border-radius: 20px;
    margin-bottom: 12px;
}
.exec-pill {
    background: #2563eb;
    color: #ffffff;
}
.exec-headline {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.4;
    margin: 0 0 10px 0;
    font-family: 'Outfit', sans-serif;
}
.exec-body {
    font-size: 12.5px;
    color: #334155;
    line-height: 1.6;
    margin: 0;
}

/* Primary Business Goal Card */
.primary-goal-card {
    background: #f0f7ff;
    border-radius: 8px;
    padding: 20px 24px;
    border: 1px solid #dbeafe;
    margin-bottom: 20px;
}
.primary-goal-title-badge {
    font-size: 11px;
    font-weight: 800;
    color: #2563eb;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.primary-goal-heading {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 12px 0;
    font-family: 'Outfit', sans-serif;
}
.goal-bullet-list {
    margin: 0;
    padding-left: 18px;
    color: #334155;
    font-size: 12px;
    line-height: 1.6;
}
.goal-bullet-list li {
    margin-bottom: 6px;
}

/* Subpage Header (Pages 2, 3, 4) */
.subpage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 16px;
    margin-bottom: 24px;
}
.subpage-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.subpage-brand-name {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    font-family: 'Outfit', sans-serif;
}
.subpage-brand-tagline {
    font-size: 10px;
    color: #64748b;
}
.subpage-section-meta {
    text-align: right;
}
.section-badge-title {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: #0f172a;
}
.section-comp-name {
    font-size: 10px;
    color: #64748b;
    margin-top: 2px;
}

/* Findings Intro */
.subpage-section-tag {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #2563eb;
    margin-bottom: 4px;
}
.findings-main-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px 0;
    font-family: 'Outfit', sans-serif;
}
.findings-intro-p {
    font-size: 12.5px;
    color: #475569;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

/* Score Cards Row */
.score-cards-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}
.score-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 14px;
    text-align: left;
}
.score-number-val {
    font-size: 28px;
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
    line-height: 1;
}
.score-number-val span {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
}
.score-number-val.score-green { color: #10b981; }
.score-number-val.score-blue { color: #2563eb; }
.score-number-val.score-amber { color: #f59e0b; }
.score-number-val.score-red { color: #ef4444; }

.score-card-label {
    font-size: 11px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.5px;
    margin-top: 8px;
}
.score-status-text {
    font-size: 10px;
    color: #64748b;
    margin-bottom: 10px;
}
.score-bar-bg {
    width: 100%;
    height: 4px;
    background: #f1f5f9;
    border-radius: 2px;
    overflow: hidden;
}
.score-bar-fill {
    height: 100%;
    border-radius: 2px;
}
.score-bar-fill.score-green { background: #10b981; }
.score-bar-fill.score-blue { background: #2563eb; }
.score-bar-fill.score-amber { background: #f59e0b; }
.score-bar-fill.score-red { background: #ef4444; }

/* Important Notice Banner */
.important-notice-box {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-radius: 6px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 10.5px;
    color: #92400e;
    margin-bottom: 22px;
}
.important-tag {
    background: #f59e0b;
    color: #ffffff;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 9.5px;
    letter-spacing: 0.5px;
}

/* 6 Findings Grid */
.findings-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}
.finding-item-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.finding-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}
.finding-badge-num {
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.finding-card-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    font-family: 'Outfit', sans-serif;
}
.finding-sublabel {
    font-size: 9.5px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.finding-text {
    font-size: 11px;
    color: #334155;
    line-height: 1.45;
    margin: 0;
}
.finding-section.what-we-do .finding-sublabel {
    color: #2563eb;
}

/* Page 3 - Service Plan Grid */
.service-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}
.step-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 16px;
}
.step-badge {
    font-size: 10px;
    font-weight: 800;
    color: #2563eb;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.step-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px 0;
    font-family: 'Outfit', sans-serif;
}
.step-subtitle {
    font-size: 10.5px;
    color: #64748b;
    margin-bottom: 12px;
    min-height: 28px;
    line-height: 1.35;
}
.step-bullets {
    margin: 0;
    padding-left: 14px;
    font-size: 11px;
    color: #334155;
    line-height: 1.5;
}
.step-bullets li {
    margin-bottom: 6px;
}

/* Page 3 - Management Outcomes */
.management-outcomes-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px 22px;
    margin-bottom: 18px;
}
.outcomes-box-title {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px 0;
    font-family: 'Outfit', sans-serif;
}
.outcomes-intro {
    font-size: 11.5px;
    color: #64748b;
    margin: 0 0 12px 0;
}
.outcomes-2col-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
}
.outcome-bullet {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 600;
    color: #1e293b;
}
.outcome-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Page 3 - Reporting Section */
.reporting-section-card {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
}
.reporting-subtag {
    font-size: 10px;
    font-weight: 800;
    color: #2563eb;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.reporting-heading {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px 0;
    font-family: 'Outfit', sans-serif;
}
.reporting-body {
    font-size: 11.5px;
    color: #334155;
    margin: 0;
    line-height: 1.5;
}

/* Page 4 - Roadmap Phases */
.roadmap-phases-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 22px;
}
.phase-roadmap-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left-width: 5px;
    border-radius: 8px;
    padding: 16px 20px;
}
.phase-roadmap-card.phase-1 { border-left-color: #2563eb; }
.phase-roadmap-card.phase-2 { border-left-color: #10b981; }
.phase-roadmap-card.phase-3 { border-left-color: #f59e0b; }

.phase-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.phase-badge-pill {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
}
.phase-1 .phase-badge-pill { color: #2563eb; }
.phase-2 .phase-badge-pill { color: #10b981; }
.phase-3 .phase-badge-pill { color: #f59e0b; }

.phase-days-text {
    font-size: 10.5px;
    color: #64748b;
    font-weight: 600;
}
.phase-card-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px 0;
    font-family: 'Outfit', sans-serif;
}
.phase-task-list {
    margin: 0 0 10px 0;
    padding-left: 16px;
    font-size: 11px;
    color: #334155;
    line-height: 1.5;
}
.phase-task-list li {
    margin-bottom: 4px;
}
.phase-outcome-block {
    background: #f8fafc;
    border-radius: 6px;
    padding: 8px 12px;
}
.phase-outcome-label {
    font-size: 9px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.phase-outcome-text {
    font-size: 11px;
    font-weight: 600;
    color: #1e293b;
}

/* Page 4 - Next Step Dark Card */
.next-step-dark-card {
    background: #0f172a;
    color: #ffffff;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 16px;
}
.next-step-title {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 6px 0;
    font-family: 'Outfit', sans-serif;
}
.next-step-desc {
    font-size: 11.5px;
    color: #cbd5e1;
    margin: 0 0 12px 0;
    line-height: 1.45;
}
.next-step-rep-info {
    font-size: 12px;
    font-weight: 700;
    color: #93c5fd;
    margin-bottom: 8px;
}
.next-step-disclaimer {
    font-size: 9.5px;
    color: #64748b;
    border-top: 1px solid #1e293b;
    padding-top: 8px;
    line-height: 1.4;
}

/* Page Footer for all pages */
.report-page-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
    font-size: 9.5px;
    color: #94a3b8;
    margin-top: auto;
}
.footer-left {
    font-weight: 500;
}
.footer-center {
    font-weight: 700;
    color: #64748b;
}
.footer-right {
    font-weight: 500;
}
