.report-dashboard .report-period-label {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text-secondary);
}

.report-dashboard .report-active-range {
    color: var(--text-secondary);
    font-size: .83rem;
    font-variant-numeric: tabular-nums;
}

.report-dashboard .report-content-tabs {
    flex-wrap: wrap;
}

.report-dashboard .report-details-header {
    display: grid;
    gap: 6px;
    padding: 16px 20px;
}

.report-dashboard .report-details-header h2 {
    font-size: 1.1rem;
}

.report-dashboard .report-details-header p {
    color: var(--text-secondary);
    font-size: .83rem;
}

.report-dashboard .report-details-header h2:focus-visible,
.report-dashboard .excel-report-scroll:focus-visible,
.report-dashboard .report-section-row th:focus-visible {
    outline: 2px solid #a5b4fc;
    outline-offset: -2px;
}

.report-dashboard .excel-report-scroll {
    max-width: 100%;
    max-height: min(72vh, 760px);
    overflow: auto;
    overscroll-behavior-inline: contain;
}

.report-dashboard .excel-report-table {
    --report-label-width: 240px;
    --report-date-width: 150px;
    min-width: calc(var(--report-label-width) + var(--report-days) * var(--report-date-width));
}

.report-dashboard .excel-report-table .report-product-cell {
    width: var(--report-label-width);
}

.report-dashboard .excel-report-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
}

.report-dashboard .excel-report-table .report-product-cell,
.report-dashboard .excel-report-table tbody th[scope="row"] {
    position: sticky;
    left: 0;
    border-right: 1px solid #273453;
}

.report-dashboard .excel-report-table .report-product-cell {
    z-index: 4;
}

.report-dashboard .excel-report-table tbody th[scope="row"] {
    z-index: 2;
    background: #101a30;
}

.report-dashboard .excel-report-table tbody .report-total-row th[scope="row"],
.report-dashboard .excel-report-table tbody tr:hover th[scope="row"] {
    background: #1a2740;
}

.report-dashboard .report-cell-value {
    white-space: normal;
    overflow-wrap: anywhere;
}

.report-dashboard .report-section-row th[id] {
    scroll-margin-top: 64px;
}

.report-dashboard #report-details-heading {
    scroll-margin-top: 104px;
}

.report-dashboard .report-detail-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

.report-dashboard .report-detail-modes .btn[aria-pressed="true"] {
    color: #f5f3ff;
    border-color: #a78bfa;
    background: #312453;
}

.report-dashboard .report-day-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-bottom: 12px;
}

.report-dashboard .report-day-header label {
    display: grid;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
    color: var(--text-secondary);
    font-size: .83rem;
}

.report-dashboard .report-day-header input {
    min-height: 44px;
    min-width: 0;
    width: 100%;
}

.report-dashboard .report-day-header p,
.report-dashboard .report-day-card > p {
    color: var(--text-secondary);
    font-size: .83rem;
}

.report-dashboard .report-day-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.report-dashboard .report-day-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
}

.report-dashboard .report-day-card h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.report-dashboard .report-day-card dl {
    margin: 8px 0 0;
}

.report-dashboard .report-day-card dl > div {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    align-items: baseline;
    gap: 6px 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--glass-border);
    overflow-wrap: anywhere;
}

.report-dashboard .report-day-card dl > div:last-child {
    border-bottom: 0;
}

.report-dashboard .report-day-card dd {
    margin: 0;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.report-dashboard .report-day-total {
    font-weight: 700;
}

.report-dashboard .report-day-card .ad-spend-breakdown {
    justify-content: flex-start;
}

@media (max-width: 760px) {
    .report-dashboard .report-day-cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .report-dashboard .report-detail-modes .btn {
        flex: 1 1 120px;
        min-height: 44px;
        white-space: normal;
    }

    .report-dashboard .report-header,
    .report-dashboard .report-controls {
        align-items: stretch;
    }

    .report-dashboard .report-product-tabs,
    .report-dashboard .report-inline-products {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-width: 0;
        width: 100%;
        padding-bottom: 0;
        overflow: visible;
    }

    .report-dashboard .report-product-tabs button,
    .report-dashboard .report-inline-products button,
    .report-dashboard .report-content-tabs button {
        min-width: 0;
        min-height: 44px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .report-dashboard .report-product-tabs button {
        flex-wrap: wrap;
        gap: 3px 8px;
        padding: 9px 11px;
    }

    .report-dashboard .report-controls .period-select-group,
    .report-dashboard .report-repeat-filter .period-select-group,
    .report-dashboard .report-period-label,
    .report-dashboard .period-select-group .filter-select {
        min-width: 0;
        max-width: 100%;
    }

    .report-dashboard .custom-date-range {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    }

    .report-dashboard .custom-date-range .report-date-input {
        width: 100%;
        min-width: 0;
    }

    .report-dashboard .custom-date-range .report-date-input,
    .report-dashboard .report-repeat-filter .period-select-group .btn {
        min-height: 44px;
    }

    .report-dashboard .excel-report-scroll {
        max-height: min(70svh, 600px);
        container-type: inline-size;
    }

    .report-dashboard .excel-report-table .report-trend-row td {
        padding-block: 7px;
        overflow: visible;
        white-space: normal;
    }

    .report-dashboard .report-trend-content {
        position: sticky;
        left: 18px;
        max-width: calc(100vw - 72px);
        max-width: calc(100cqi - 36px);
        line-height: 1.6;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 600px) {
    .report-dashboard .report-header {
        gap: 14px;
    }

    .report-dashboard .report-header .internal-actions {
        gap: 8px;
    }

    .report-dashboard .report-header .internal-actions .btn {
        min-height: 44px;
        padding-inline: 10px;
        white-space: normal;
    }

    .report-dashboard .goal-stage-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .report-dashboard .goal-stage-grid .goal-stage[data-stage] {
        padding: 12px;
        border-left: 0;
    }

    .report-dashboard .goal-hover .metric-tooltip {
        min-width: 0;
        width: max-content;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .report-dashboard .report-keywords {
        flex-wrap: wrap;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .report-dashboard .report-details-header {
        padding: 12px;
    }

    .report-dashboard .excel-report-table {
        --report-label-width: clamp(106px, 35vw, 135px);
        --report-date-width: 140px;
    }

    .report-dashboard .excel-report-table th,
    .report-dashboard .excel-report-table td {
        padding-inline: 10px;
    }

    .report-dashboard .excel-report-table thead th {
        height: 50px;
    }

    .report-dashboard .excel-report-table .report-product-cell {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .report-dashboard .report-trend-content {
        left: 10px;
        max-width: calc(100vw - 54px);
        max-width: calc(100cqi - 20px);
    }

    .report-dashboard .report-section-row th[id] {
        scroll-margin-top: 56px;
    }
}

@media (max-width: 340px) {
    .report-dashboard .custom-date-range {
        grid-template-columns: minmax(0, 1fr);
    }

    .report-dashboard .custom-date-sep {
        text-align: center;
    }
}
