/* Parent Dashboard — focused, evidence-led Reports page. */
html:has(.math-parent-dashboard-shell[data-parent-section="reports"]),
body:has(.math-parent-dashboard-shell[data-parent-section="reports"]) {
    overflow: auto;
}

.math-parent-dashboard-shell[data-parent-section="reports"],
.math-parent-dashboard-shell[data-parent-section="reports"] .math-parent-layout,
.math-parent-dashboard-shell[data-parent-section="reports"] .math-parent-workspace {
    overflow: visible;
}

.math-parent-dashboard-shell[data-parent-section="reports"] {
    position: relative;
    inset: auto;
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    min-height: 100svh;
}

.math-parent-dashboard-shell[data-parent-section="reports"] .math-parent-layout {
    height: auto;
    min-height: 100svh;
}

.math-parent-dashboard-shell[data-parent-section="reports"] .math-parent-content {
    padding-top: 0;
    overflow: visible;
}

.math-parent-reports {
    width: 100%;
    max-width: var(--parent-content-max);
}

.math-parent-reports .math-parent-period-switch {
    margin-bottom: clamp(1.5rem, 3vw, 3rem);
}

.math-parent-reports .math-parent-report-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(.85rem, 1.5vw, 1.5rem);
}

.math-parent-reports .math-parent-report-kpi {
    display: flex;
    min-width: 0;
    min-height: 10.5rem;
    padding: clamp(1.1rem, 1.6vw, 1.5rem);
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    text-align: left;
}

.math-parent-reports .math-parent-report-kpi > small {
    color: var(--parent-color-success);
    font-size: clamp(.92rem, .82rem + .27vw, 1.125rem);
    font-weight: 850;
    letter-spacing: .045em;
    line-height: 1.15;
    text-transform: uppercase;
}

.math-parent-reports .math-parent-report-kpi > strong {
    display: block;
    margin: .6rem 0;
    color: var(--parent-color-text);
    font-size: clamp(2rem, 2.5vw, 2.75rem);
    font-weight: 850;
    letter-spacing: -.03em;
    line-height: 1;
    white-space: nowrap;
}

.math-parent-reports .math-parent-report-kpi > p {
    margin: 0;
    color: var(--parent-color-text-muted);
    font-size: clamp(.72rem, .85vw, .86rem);
    line-height: 1.3;
}

.math-parent-report-insights {
    display: grid;
    margin-top: clamp(1.25rem, 2.3vw, 2rem);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(.85rem, 1.5vw, 1.5rem);
}

.math-parent-dashboard-shell .math-parent-insight-card {
    min-width: 0;
    min-height: 16rem;
    overflow: hidden;
}

.math-parent-insight-heading {
    display: flex;
    min-height: 4.25rem;
    padding: 1rem 1.25rem;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    border-bottom: 1px solid var(--parent-border-soft);
    background: rgba(46, 47, 112, .58);
}

.math-parent-insight-heading h2 {
    min-width: 0;
    margin: 0;
    color: var(--parent-color-text);
    font-size: clamp(1.25rem, 1rem + .65vw, 1.75rem);
    font-weight: 850;
    letter-spacing: -.025em;
    line-height: 1.1;
}

.math-parent-insight-action {
    display: inline-flex;
    min-height: 2.5rem;
    align-items: center;
    color: var(--parent-color-success) !important;
    font-size: clamp(.72rem, .75vw, .86rem);
    font-weight: 800;
    text-decoration: none !important;
    white-space: nowrap;
}

.math-parent-insight-card:last-child .math-parent-insight-action {
    color: var(--parent-color-attention) !important;
}

.math-parent-insight-action:hover,
.math-parent-insight-action:focus-visible {
    text-decoration: underline !important;
    text-underline-offset: .2em;
}

.math-parent-insight-row {
    display: flex;
    min-height: 6rem;
    padding: .8rem 1.25rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .045);
    background: rgba(13, 20, 70, .38);
}

.math-parent-insight-row:nth-child(even) {
    background: rgba(45, 48, 112, .33);
}

.math-parent-insight-name {
    min-width: 0;
    color: var(--parent-color-text);
    font-size: clamp(.95rem, .82rem + .38vw, 1.25rem);
    font-weight: 650;
    line-height: 1.25;
}

.math-parent-insight-ring {
    --report-accent: #82ff82;
    display: grid;
    position: relative;
    width: 4rem;
    height: 4rem;
    flex: 0 0 auto;
    place-items: center;
    isolation: isolate;
    border-radius: 50%;
    background: conic-gradient(from 180deg, var(--report-accent) var(--report-progress), #b7beca 0);
    color: var(--report-accent);
    font-size: 1rem;
    font-weight: 850;
    line-height: 1;
}

.math-parent-insight-ring::before {
    position: absolute;
    z-index: -1;
    inset: .35rem;
    border-radius: 50%;
    background: #fff;
    content: "";
}

.math-parent-insight-card:last-child .math-parent-insight-ring {
    --report-accent: #ffb000;
}

.math-parent-insight-row.is-low .math-parent-insight-ring {
    --report-accent: #ff6666;
}

.math-parent-report-empty {
    margin: 0;
    padding: 1.5rem 1.25rem;
    color: var(--parent-color-text-muted);
    font-size: .95rem;
    line-height: 1.5;
}

@media (max-width: 1120px) {
    .math-parent-reports .math-parent-report-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .math-parent-report-insights {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .math-parent-dashboard-shell .math-parent-insight-card {
        min-height: 0;
    }

    .math-parent-reports .math-parent-report-metrics {
        gap: .75rem;
    }

    .math-parent-reports .math-parent-report-kpi {
        min-height: 9rem;
        padding: 1rem;
    }

    .math-parent-reports .math-parent-report-kpi > strong {
        font-size: clamp(1.6rem, 5vw, 2rem);
    }

    .math-parent-insight-heading {
        padding-inline: 1rem;
    }

    .math-parent-insight-row {
        padding-inline: 1rem;
    }
}

@media (max-width: 420px) {
    .math-parent-reports .math-parent-report-metrics {
        grid-template-columns: 1fr;
    }

    .math-parent-insight-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: .25rem;
    }
}
