.dashboard-view {
    position: relative;
}

.dashboard-view-dialog-tall {
    height: min(40rem, calc(100dvh - 2rem));
}

.dashboard-goal-view [data-async-view-content] {
    display: contents;
}

.dashboard-view [data-async-view-content] > .card-heading,
.dashboard-view .index-card-heading {
    padding-right: 2.25rem;
}

.report-edit-button {
    position: absolute;
    z-index: 4;
    top: 1.05rem;
    right: 1.05rem;
}

.report-edit-button:focus-visible {
    outline: 2px solid var(--app-border);
    outline-offset: 2px;
}

.friend-search-control {
    position: relative;
}

.friend-search-control .inline-search {
    margin-top: 0;
}

.friend-search-results {
    position: absolute;
    z-index: 8;
    top: calc(100% + 0.35rem);
    right: 0;
    left: 0;
    max-height: 14rem;
    border: 1px solid var(--app-border);
    border-radius: 0.75rem;
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
    overflow-y: auto;
}

.friend-search-results[hidden] {
    display: none;
}

.friend-search-results .entity-list {
    margin-top: 0;
}

.friend-search-results .entity-row:first-child {
    border-top: 0;
}

.report-series-current {
    color: var(--primary);
}

.report-series-friend {
    color: var(--accent);
}

.report-series-previous {
    color: var(--app-previous-series);
}

.line-report-frame,
.bar-report-frame {
    display: grid;
    margin-top: 1rem;
    grid-template-columns: 3.4rem minmax(0, 1fr);
    gap: 0.55rem;
}

.report-y-axis {
    display: flex;
    height: 15rem;
    color: var(--app-text-muted);
    padding: 0.05rem 0 1.65rem;
    flex-direction: column;
    justify-content: space-between;
    font-size: 0.56rem;
    text-align: right;
}

.line-report {
    position: relative;
    height: 15rem;
}

.line-report svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.report-grid-lines line {
    stroke: var(--app-border);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.report-line {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 8;
    vector-effect: non-scaling-stroke;
}

.report-series-previous .report-line {
    stroke-width: 6;
}

.report-forecast {
    opacity: 0.25;
    stroke-width: 7;
}

.report-series-current .report-forecast {
    opacity: var(--app-primary-forecast-opacity);
}

.report-goal-line {
    fill: none;
    stroke: var(--app-text-muted);
    stroke-dasharray: 7 5;
    stroke-linecap: round;
    stroke-width: 2.5;
    vector-effect: non-scaling-stroke;
}

@media (max-width: 700px) {
    .report-line {
        stroke-width: 9;
    }

    .report-series-previous .report-line {
        stroke-width: 7;
    }

    .report-forecast {
        stroke-width: 8;
    }

    .report-goal-line {
        stroke-width: 3;
    }
}

.report-goal-label {
    display: flex;
    margin: 0.45rem 0 0 3.95rem;
    color: var(--app-text-muted);
    align-items: center;
    gap: 0.35rem;
    font-size: 0.6rem;
}

.report-point {
    fill: transparent;
    stroke: transparent;
    cursor: crosshair;
    vector-effect: non-scaling-stroke;
}

.report-point:focus {
    fill: currentColor;
    outline: none;
    stroke: var(--app-surface);
    stroke-width: 2;
}

.report-forecast-point:focus {
    opacity: 0.25;
}

.report-tooltip {
    top: 0;
    left: 0;
    transform: translate(-50%, -115%);
}

.line-axis {
    display: flex;
    margin: 0.15rem 0 0 3.95rem;
    color: var(--app-text-muted);
    justify-content: space-between;
    font-size: 0.58rem;
}

.grouped-bars {
    display: grid;
    height: 13rem;
    position: relative;
    align-items: end;
    gap: 0.5rem;
}

.bar-report-frame .report-y-axis {
    height: 13rem;
    padding-bottom: 1.25rem;
}

.bucket-bars {
    grid-template-columns: repeat(7, minmax(2.25rem, 1fr));
}

.monthly-bars {
    gap: 0.2rem;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.monthly-bars .bar-group {
    font-size: 0.52rem;
}

.monthly-bars .bar-values {
    gap: 0.08rem;
}

.monthly-bars .report-bar {
    width: 42%;
    max-width: 0.75rem;
}

.bar-group {
    display: grid;
    height: 100%;
    min-width: 0;
    color: var(--app-text-muted);
    grid-template-rows: minmax(0, 1fr) 0.85rem;
    gap: 0.35rem;
    font-size: 0.58rem;
    text-align: center;
}

.bar-values {
    display: flex;
    height: 100%;
    align-items: end;
    justify-content: center;
    gap: 0.2rem;
    border-bottom: 1px solid var(--app-border);
}

.report-bar {
    display: block;
    width: min(1rem, 42%);
    height: var(--bar-height);
    border-radius: 3px 3px 0 0;
    background: currentColor;
}

.report-bar:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.ten-k-list {
    max-height: 22rem;
    margin-top: 1rem;
    overflow: auto;
    scrollbar-color: var(--app-border) transparent;
    scrollbar-width: thin;
}

.ten-k-list th,
.ten-k-list td {
    color: var(--app-text-muted);
    padding: 0.55rem 0.7rem;
    font-size: 0.68rem;
    text-align: right;
    white-space: nowrap;
}

.ten-k-list thead th {
    position: sticky;
    z-index: 1;
    top: 0;
    background: var(--app-surface);
    font-size: 0.58rem;
}

.ten-k-list th:nth-child(2) {
    width: 100%;
    text-align: left;
}

.ten-k-list tbody th strong,
.ten-k-list tbody th span {
    display: block;
}

.ten-k-list tbody th strong {
    color: var(--app-text);
    font-size: 0.72rem;
}

.ten-k-list tbody th span {
    margin-top: 0.1rem;
    color: var(--app-text-muted);
    font-size: 0.58rem;
    font-weight: 400;
}

.view-type-options {
    display: grid;
    gap: 0.55rem;
}

.view-type-options button {
    display: flex;
    min-height: 3.5rem;
    border: 0;
    border-radius: 8px;
    background: var(--app-surface);
    color: var(--app-text);
    cursor: pointer;
    padding: 0.75rem;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
}

.view-type-options button:hover,
.view-type-options button:focus-visible {
    background: var(--app-surface-muted);
}

.view-type-options i {
    width: 1.25rem;
    color: var(--app-text-muted);
    opacity: 0.5;
    text-align: center;
}

@media (max-width: 640px) {
    .line-report {
        height: 11rem;
    }

    .report-y-axis {
        height: 11rem;
    }

    .line-report-frame,
    .bar-report-frame {
        grid-template-columns: 2.8rem minmax(0, 1fr);
    }

    .line-axis {
        margin-left: 3.35rem;
    }

    .grouped-bars {
        height: 10rem;
        padding-bottom: 0.1rem;
        overflow-x: auto;
    }

    .bar-report-frame .report-y-axis {
        height: 10rem;
    }

    .bucket-bars {
        grid-template-columns: repeat(7, minmax(3rem, 1fr));
    }

    .monthly-bars {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .monthly-bars .bar-group {
        font-size: 0.45rem;
    }

    .ten-k-list th,
    .ten-k-list td {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
    }
}
