/* Reports share the fixed sidebar and independently scrolling workspace. */

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

.math-parent-reports .math-parent-period-switch {
    margin-bottom: 24px;
}

.math-parent-reports .math-parent-report-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.math-parent-reports .math-parent-report-kpi {
    display: flex;
    min-width: 0;
    min-height: 148px;
    padding: 20px;
    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-text-muted);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.4;
    text-transform: none;
}

.math-parent-reports .math-parent-report-kpi > strong {
    display: block;
    margin: .6rem 0;
    color: var(--parent-color-text);
    font-size: var(--parent-type-metric);
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    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: var(--parent-type-help);
    line-height: 1.3;
}

.math-parent-report-insights {
    display: grid;
    margin-top: 24px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

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

.math-parent-insight-heading {
    display: flex;
    min-height: 60px;
    padding: 16px 20px;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    border-bottom: 1px solid var(--parent-border-soft);
    background: transparent;
}

.math-parent-insight-heading h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin: 0;
    color: var(--parent-color-text);
    font-size: var(--parent-type-card-title);
    font-weight: 600;
    letter-spacing: -.025em;
    line-height: 1.1;
}

.math-parent-insight-heading h2 > svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    color: var(--parent-color-text-muted);
}

.math-parent-insight-action {
    display: inline-flex;
    min-height: 2.5rem;
    align-items: center;
    color: var(--parent-color-success) !important;
    font-size: 12px;
    font-weight: 500;
    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: 76px;
    padding: 16px 20px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .045);
    background: transparent;
}

.math-parent-insight-row:nth-child(even) {
    background: transparent;
}

.math-parent-insight-name {
    min-width: 0;
    color: var(--parent-color-text);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
}

.math-parent-insight-ring {
    --report-accent: #82ff82;
    display: grid;
    position: relative;
    width: 44px;
    height: 44px;
    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: 11px;
    font-weight: 600;
    line-height: 1;
}

.math-parent-insight-ring::before {
    position: absolute;
    z-index: -1;
    inset: 4px;
    border-radius: 50%;
    background: var(--parent-surface-glass);
    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: 14px;
    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: 140px;
        padding: 16px;
    }

    .math-parent-reports .math-parent-report-kpi > strong {
        font-size: 28px;
    }

    .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: repeat(2,minmax(0,1fr));
    }

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