/* =========================================================
   ARRSIT Executive Impact Report
   style.css
   ========================================================= */

:root {
    --page-bg: #f3f7fb;
    --panel-bg: #ffffff;
    --text-main: #1f2d3d;
    --text-muted: #66788a;
    --border: #dce6ef;

    --teal: #2a9d9f;
    --blue: #4f8ddf;
    --purple: #8b6bd6;
    --green: #5aa66b;
    --orange: #e8a14a;
    --pink: #d96aa7;

    --shadow: 0 10px 28px rgba(31, 45, 61, 0.08);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}


/* =========================================================
   GLOBAL
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        linear-gradient(
            180deg,
            #eef5fa 0%,
            #f7fafc 28%,
            #f4f7fa 100%
        );
    color: var(--text-main);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
input,
textarea,
select {
    font: inherit;
}

.report-page {
    width: min(1500px, calc(100% - 32px));
    margin: 24px auto 36px;
}


/* =========================================================
   HEADER
   ========================================================= */

.report-header {
    display: grid;
    grid-template-columns: 1.05fr 1.35fr 1fr;
    gap: 24px;
    align-items: center;
    padding: 24px 28px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(220, 230, 239, 0.9);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-symbol {
    position: relative;
    width: 74px;
    height: 56px;
    flex: 0 0 auto;
}

.brand-person {
    position: absolute;
    width: 17px;
    height: 17px;
    border-radius: 50%;
}

.brand-person::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 14px;
    width: 22px;
    height: 28px;
    border-radius: 14px 14px 5px 5px;
    transform: translateX(-50%);
}

.brand-person-one {
    left: 4px;
    top: 8px;
    background: var(--teal);
}

.brand-person-one::after {
    background: rgba(42, 157, 159, 0.2);
    border: 3px solid var(--teal);
}

.brand-person-two {
    left: 28px;
    top: 2px;
    background: var(--purple);
}

.brand-person-two::after {
    background: rgba(139, 107, 214, 0.2);
    border: 3px solid var(--purple);
}

.brand-person-three {
    left: 52px;
    top: 8px;
    background: var(--orange);
}

.brand-person-three::after {
    background: rgba(232, 161, 74, 0.2);
    border: 3px solid var(--orange);
}

.brand-heart {
    position: absolute;
    right: 2px;
    bottom: -3px;
    color: var(--pink);
    font-size: 24px;
    font-weight: 700;
}

.brand-name {
    margin: 0;
    color: var(--teal);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.brand-tagline {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
}

.title-area {
    text-align: center;
}

.title-area h1 {
    margin: 0;
    color: #243447;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.organisation-name {
    margin: 8px 0 0;
    color: var(--teal);
    font-size: 20px;
    font-weight: 700;
}

.reporting-period {
    margin: 7px 0 0;
    color: var(--text-muted);
    font-size: 14px;
}

.status-card {
    display: flex;
    justify-self: end;
    align-items: center;
    gap: 12px;
    width: min(100%, 290px);
    padding: 16px 18px;
    background: #f8fbfd;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.status-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--blue);
    background: rgba(79, 141, 223, 0.1);
    border-radius: 12px;
    font-size: 23px;
}

.status-live {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-weight: 700;
}

.live-dot {
    width: 9px;
    height: 9px;
    background: #28a745;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(40, 167, 69, 0.12);
}

.status-updated,
.status-source {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 12px;
}


/* =========================================================
   KPI CARDS
   ========================================================= */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 20px 18px;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 6px;
    background: var(--card-accent);
}

.kpi-card h2 {
    margin: 14px 0 0;
    font-size: 15px;
    font-weight: 700;
}

.kpi-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--card-accent);
    background: var(--card-tint);
    border-radius: 12px;
    font-size: 21px;
    font-weight: 700;
}

.kpi-value {
    margin: 10px 0 0;
    color: var(--card-accent);
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.kpi-description {
    min-height: 38px;
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.45;
}

.kpi-trend {
    margin: 8px 0 0;
    color: #36844c;
    font-size: 12px;
    font-weight: 700;
}

.kpi-participants {
    --card-accent: var(--teal);
    --card-tint: rgba(42, 157, 159, 0.11);
}

.kpi-completion {
    --card-accent: var(--blue);
    --card-tint: rgba(79, 141, 223, 0.11);
}

.kpi-goal {
    --card-accent: var(--purple);
    --card-tint: rgba(139, 107, 214, 0.11);
}

.kpi-wellbeing {
    --card-accent: var(--green);
    --card-tint: rgba(90, 166, 107, 0.12);
}

.kpi-impact {
    --card-accent: var(--pink);
    --card-tint: rgba(217, 106, 167, 0.11);
}


/* =========================================================
   PANELS
   ========================================================= */

.panel {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.main-grid {
    display: grid;
    grid-template-columns: 0.92fr 2.08fr;
    gap: 20px;
    margin-bottom: 20px;
}

.findings-panel {
    padding: 24px;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-header h2 {
    margin: 0;
    font-size: 22px;
}

.panel-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--teal);
    background: rgba(42, 157, 159, 0.1);
    border-radius: 10px;
    font-size: 18px;
}

.panel-subtitle {
    margin: 7px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.findings-list {
    display: grid;
    gap: 14px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.findings-list li {
    position: relative;
    padding: 13px 14px 13px 42px;
    color: #33465a;
    background: #f7fafc;
    border: 1px solid #e8eff5;
    border-radius: 13px;
    font-size: 14px;
    line-height: 1.5;
}

.findings-list li::before {
    content: "✓";
    position: absolute;
    left: 14px;
    top: 13px;
    display: grid;
    place-items: center;
    width: 19px;
    height: 19px;
    color: #ffffff;
    background: var(--teal);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}


/* =========================================================
   CHARTS
   ========================================================= */

.charts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.chart-panel {
    padding: 20px;
}

.chart-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.chart-header h3 {
    margin: 0;
    font-size: 17px;
}

.chart-header p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.chart-number {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    color: #ffffff;
    background: var(--teal);
    border-radius: 50%;
    font-size: 13px;
    font-weight: 800;
}

.chart-caption {
    margin: 14px 0 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}


/* Completion chart */

.completion-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 210px;
    margin-top: 20px;
    padding: 12px 8px 0;
    border-bottom: 1px solid var(--border);
}

.completion-item {
    display: grid;
    grid-template-rows: auto 1fr auto;
    justify-items: center;
    width: 29%;
    height: 100%;
}

.completion-percentage {
    margin-bottom: 8px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
}

.vertical-track {
    display: flex;
    align-items: flex-end;
    width: 54px;
    height: 150px;
    overflow: hidden;
    background: #edf3f8;
    border-radius: 12px 12px 4px 4px;
}

.vertical-bar {
    width: 100%;
    background:
        linear-gradient(
            180deg,
            var(--blue),
            var(--teal)
        );
    border-radius: 12px 12px 4px 4px;
}

.completion-label {
    margin-top: 10px;
    color: #43566a;
    font-size: 12px;
    font-weight: 700;
}


/* Outcome chart */

.outcome-chart {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.outcome-row {
    display: grid;
    grid-template-columns: 72px 1fr 42px;
    gap: 9px;
    align-items: center;
}

.outcome-name {
    color: #415367;
    font-size: 12px;
    font-weight: 700;
}

.horizontal-track {
    height: 14px;
    overflow: hidden;
    background: #edf3f8;
    border-radius: 999px;
}

.horizontal-bar {
    height: 100%;
    background:
        linear-gradient(
            90deg,
            var(--purple),
            var(--teal)
        );
    border-radius: inherit;
}

.outcome-score {
    color: var(--purple);
    font-size: 12px;
    font-weight: 800;
    text-align: right;
}


/* Goal donut */

.goal-chart {
    display: grid;
    justify-items: center;
    gap: 18px;
    margin-top: 18px;
}

.goal-donut {
    display: grid;
    place-items: center;
    width: 168px;
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        conic-gradient(
            var(--teal) 0 34%,
            var(--purple) 34% 62%,
            var(--orange) 62% 82%,
            var(--blue) 82% 100%
        );
}

.goal-donut-centre {
    display: grid;
    place-items: center;
    width: 92px;
    aspect-ratio: 1;
    background: #ffffff;
    border-radius: 50%;
}

.goal-donut-centre strong {
    color: #2f4358;
    font-size: 28px;
}

.goal-donut-centre span {
    margin-top: -8px;
    color: var(--text-muted);
    font-size: 11px;
}

.goal-legend {
    display: grid;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.goal-legend li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #425569;
    font-size: 12px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 50%;
}

.legend-one {
    background: var(--teal);
}

.legend-two {
    background: var(--purple);
}

.legend-three {
    background: var(--orange);
}

.legend-four {
    background: var(--blue);
}


/* =========================================================
   LOWER PANELS
   ========================================================= */

.lower-grid {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 20px;
}

.recommendations-panel,
.explore-panel {
    padding: 24px;
}

.recommendations-layout {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    gap: 20px;
    margin-top: 18px;
}

.recommendations-list {
    display: grid;
    gap: 11px;
    margin: 0;
    padding-left: 22px;
}

.recommendations-list li {
    padding-left: 4px;
    color: #33465a;
    font-size: 14px;
    line-height: 1.5;
}

.recommendations-list li::marker {
    color: var(--orange);
    font-weight: 800;
}

.participant-quote {
    position: relative;
    margin: 0;
    padding: 24px 18px 18px;
    color: #3b4f64;
    background: #f6f2fb;
    border: 1px solid #e8dcf6;
    border-radius: var(--radius-md);
}

.quote-symbol {
    position: absolute;
    left: 15px;
    top: 0;
    color: rgba(139, 107, 214, 0.35);
    font-family: Georgia, serif;
    font-size: 52px;
    line-height: 1;
}

.participant-quote p {
    margin: 8px 0 0;
    font-size: 15px;
    font-style: italic;
    line-height: 1.55;
}

.participant-quote footer {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 11px;
}


/* Explore panel */

.question-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.question-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 13px 14px;
    color: #33475b;
    background: #f8fafc;
    border: 1px solid #e2eaf1;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        background 0.15s ease;
}

.question-button:hover {
    transform: translateY(-1px);
    background: #f1f7fa;
    border-color: rgba(42, 157, 159, 0.45);
}

.question-button:focus-visible {
    outline: 3px solid rgba(79, 141, 223, 0.25);
    outline-offset: 2px;
}

.question-button span:last-child {
    color: var(--teal);
    font-size: 20px;
    font-weight: 800;
}

.question-feedback {
    min-height: 20px;
    margin: 12px 0 0;
    color: var(--teal);
    font-size: 12px;
    font-weight: 700;
}


/* =========================================================
   FOOTER
   ========================================================= */

.report-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    margin-top: 20px;
    padding: 16px 20px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 12px;
    text-align: center;
}

.report-footer p {
    margin: 0;
}

.footer-icon {
    color: var(--teal);
    font-size: 18px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1180px) {
    .report-header {
        grid-template-columns: 1fr 1.25fr;
    }

    .status-card {
        grid-column: 1 / -1;
        justify-self: stretch;
        width: 100%;
    }

    .kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .report-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .brand-area {
        justify-content: center;
    }

    .status-card {
        justify-self: center;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .lower-grid,
    .recommendations-layout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 560px) {
    .report-page {
        width: min(100% - 18px, 1500px);
        margin-top: 10px;
    }

    .report-header,
    .findings-panel,
    .chart-panel,
    .recommendations-panel,
    .explore-panel {
        padding: 18px;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .kpi-card {
        min-height: 0;
    }

    .outcome-row {
        grid-template-columns: 65px 1fr 38px;
    }

    .title-area h1 {
        font-size: 30px;
    }
}
