.sysadmin-reports-page {
    padding-bottom: 2rem;
}

.reports-workspace {
    display: grid;
    grid-template-columns: minmax(250px, 0.3fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.reports-sidebar,
.reports-detail {
    min-width: 0;
    padding: 1.25rem;
    border: 1px solid var(--line, #d8dee8);
    border-radius: 0.8rem;
    background: #fff;
}

.reports-sidebar {
    position: sticky;
    top: 1rem;
}

.reports-sidebar-heading,
.reports-detail-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.reports-sidebar-heading h2,
.reports-detail-heading h2,
.reports-detail-heading p {
    margin: 0;
}

.reports-detail-heading p:last-child {
    margin-top: 0.35rem;
    color: var(--muted, #667085);
}

.reports-list {
    display: grid;
    gap: 0.65rem;
}

.reports-list-item {
    display: grid;
    gap: 0.25rem;
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line, #d8dee8);
    border-radius: 0.65rem;
    background: #fff;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.reports-list-item:hover,
.reports-list-item:focus-visible {
    border-color: #217c4d;
    outline: 2px solid color-mix(in srgb, #217c4d 22%, transparent);
    outline-offset: 1px;
}

.reports-list-item.is-selected {
    border-color: #217c4d;
    background: #f1f8f4;
    box-shadow: inset 4px 0 #217c4d;
}

.reports-list-item span,
.reports-placeholder {
    color: var(--muted, #667085);
    font-size: 0.86rem;
}

.reports-row-count {
    flex: none;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #eef2f0;
    color: #34443b;
    font-size: 0.84rem;
    font-weight: 700;
}

.reports-status {
    padding: 1rem;
    border: 1px solid #cfd8d2;
    border-radius: 0.65rem;
    background: #f5f8f6;
    color: #3c4d43;
}

.reports-status.is-error {
    border-color: #e5bbb4;
    background: #fff5f3;
    color: #8b2f23;
}

.reports-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0 1.25rem;
}

.reports-summary article {
    display: grid;
    gap: 0.25rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid #dde3df;
    border-radius: 0.65rem;
    background: #f8faf9;
}

.reports-summary span {
    color: var(--muted, #667085);
    font-size: 0.78rem;
}

.reports-summary strong {
    font-size: 1.35rem;
}

.reports-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line, #d8dee8);
    border-radius: 0.65rem;
}

.reports-table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
}

.reports-table th,
.reports-table td {
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid #e5e9e6;
    text-align: left;
    vertical-align: middle;
}

.reports-table th {
    background: #f5f7f6;
    color: #445149;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.reports-table th.is-number,
.reports-table td.is-number {
    text-align: right;
}

.reports-table tbody tr:last-child td {
    border-bottom: 0;
}

.reports-table tbody tr:hover {
    background: #fafcfb;
}

.reports-badge {
    display: inline-flex;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    background: #edf0ee;
    color: #4e5b54;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.reports-badge.is-positive {
    background: #e5f5eb;
    color: #176b3e;
}

.reports-badge.is-warning {
    background: #fff1cf;
    color: #865d00;
}

.reports-badge.is-critical {
    background: #fde7e3;
    color: #9b3024;
}

.reports-status-cell,
.reports-identity,
.reports-differences,
.reports-login,
.reports-login > span,
.reports-difference {
    display: grid;
    gap: 0.3rem;
}

.reports-status-cell small,
.reports-identity small,
.reports-login small,
.reports-difference small,
.reports-current-value {
    color: var(--muted, #667085);
    font-size: 0.76rem;
    line-height: 1.35;
}

.reports-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.reports-flags .reports-badge {
    padding: 0.15rem 0.4rem;
    font-size: 0.7rem;
}

.reports-differences {
    min-width: 270px;
}

.reports-difference {
    padding-left: 0.55rem;
    border-left: 3px solid #d36b5c;
}

.reports-difference.is-missing {
    border-left-color: #d2a231;
}

.reports-login {
    min-width: 180px;
}

.reports-empty {
    margin: 0;
    padding: 1.5rem;
    color: var(--muted, #667085);
    text-align: center;
}

@media (max-width: 900px) {
    .reports-workspace {
        grid-template-columns: 1fr;
    }

    .reports-sidebar {
        position: static;
    }

    .reports-summary {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }
}

@media (max-width: 540px) {
    .reports-summary {
        grid-template-columns: 1fr;
    }

    .reports-detail-heading {
        flex-direction: column;
    }
}
