.nms-reports {
    display: grid;
    min-width: 0;
    gap: 1.25rem;
    font-size: 0.875rem;
}

.nms-reports__chooser,
.nms-reports__filter-panel,
.nms-reports__report {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgb(229 231 235);
    border-radius: 0.625rem;
    background: white;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(0 0 0 / 0.025);
}

.nms-reports__chooser {
    padding: 1.25rem;
}

.nms-reports__section-heading,
.nms-reports__filter-header,
.nms-reports__report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nms-reports__section-heading {
    margin-bottom: 1rem;
}

.nms-reports__section-heading h2,
.nms-reports__filter-header h2,
.nms-reports__report-header h2 {
    margin: 0;
    color: rgb(17 24 39);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
}

.nms-reports__section-heading p,
.nms-reports__filter-header p,
.nms-reports__report-header p {
    margin: 0;
    color: rgb(107 114 128);
    font-size: 0.875rem;
    line-height: 1.45;
}

.nms-reports__eyebrow {
    display: block;
    margin-bottom: 0.2rem;
    color: rgb(220 38 38);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nms-reports__tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.nms-reports__tab {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    min-width: 0;
    gap: 0.75rem;
    padding: 0.875rem;
    border: 1px solid rgb(229 231 235);
    border-radius: 0.5rem;
    background: rgb(249 250 251 / 0.7);
    color: rgb(75 85 99);
    text-align: left;
    transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.nms-reports__tab:hover {
    border-color: rgb(239 68 68 / 0.5);
    background: rgb(254 242 242);
    transform: translateY(-1px);
}

.nms-reports__tab:focus-visible {
    outline: 2px solid rgb(239 68 68);
    outline-offset: 2px;
}

.nms-reports__tab.is-active {
    border-color: rgb(239 68 68 / 0.75);
    background: linear-gradient(135deg, rgb(254 242 242), rgb(254 226 226));
    box-shadow: 0 0 0 1px rgb(239 68 68 / 0.08), 0 8px 20px rgb(239 68 68 / 0.08);
}

.nms-reports__tab-icon,
.nms-reports__filter-icon {
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background: white;
    color: rgb(107 114 128);
    box-shadow: inset 0 0 0 1px rgb(229 231 235);
}

.nms-reports__tab-icon svg,
.nms-reports__filter-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.nms-reports__tab.is-active .nms-reports__tab-icon {
    background: rgb(239 68 68);
    color: white;
    box-shadow: 0 6px 14px rgb(239 68 68 / 0.22);
}

.nms-reports__tab-copy {
    display: grid;
    min-width: 0;
    gap: 0.15rem;
}

.nms-reports__tab-copy strong {
    overflow: hidden;
    color: rgb(31 41 55);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
}

.nms-reports__tab-copy small {
    display: -webkit-box;
    overflow: hidden;
    color: rgb(107 114 128);
    font-size: 0.875rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.nms-reports__tab-arrow {
    width: 1rem;
    height: 1rem;
    color: rgb(156 163 175);
    transition: transform 150ms ease, color 150ms ease;
}

.nms-reports__tab:hover .nms-reports__tab-arrow,
.nms-reports__tab.is-active .nms-reports__tab-arrow {
    color: rgb(220 38 38);
    transform: translateX(2px);
}

.nms-reports__filter-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgb(229 231 235);
    background: rgb(249 250 251 / 0.8);
}

.nms-reports__filter-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nms-reports__filter-icon {
    width: 2.25rem;
    height: 2.25rem;
    color: rgb(220 38 38);
}

.nms-reports__filters {
    padding: 1.125rem 1.25rem 1.25rem;
}

.nms-reports__content {
    position: relative;
    display: grid;
    min-width: 0;
    gap: 1.25rem;
    transition: opacity 150ms ease;
}

.nms-reports__content::before {
    position: absolute;
    z-index: 10;
    top: -0.25rem;
    left: 0;
    width: 0;
    height: 0.2rem;
    border-radius: 999px;
    background: rgb(239 68 68);
    content: '';
    opacity: 0;
}

.nms-reports__content.is-loading {
    opacity: 0.58;
}

.nms-reports__content.is-loading::before {
    width: 45%;
    opacity: 1;
    animation: nms-report-loading 900ms ease-in-out infinite alternate;
}

@keyframes nms-report-loading {
    from { transform: translateX(0); }
    to { transform: translateX(122%); }
}

.nms-reports__summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.nms-reports__summary-card {
    position: relative;
    display: grid;
    min-width: 0;
    gap: 0.3rem;
    padding: 1rem 1.125rem;
    overflow: hidden;
    border: 1px solid rgb(229 231 235);
    border-radius: 0.625rem;
    background: white;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.035);
}

.nms-reports__summary-card::after {
    position: absolute;
    right: -1.5rem;
    bottom: -2rem;
    width: 6rem;
    height: 6rem;
    border-radius: 999px;
    background: rgb(239 68 68 / 0.055);
    content: '';
}

.nms-reports__summary-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    color: rgb(75 85 99);
    font-size: 0.875rem;
    font-weight: 600;
}

.nms-reports__summary-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: rgb(239 68 68);
    box-shadow: 0 0 0 0.25rem rgb(239 68 68 / 0.1);
}

.nms-reports__summary-card:nth-child(2) .nms-reports__summary-dot {
    background: rgb(14 165 233);
    box-shadow: 0 0 0 0.25rem rgb(14 165 233 / 0.1);
}

.nms-reports__summary-card:nth-child(3) .nms-reports__summary-dot {
    background: rgb(16 185 129);
    box-shadow: 0 0 0 0.25rem rgb(16 185 129 / 0.1);
}

.nms-reports__summary-card:nth-child(4) .nms-reports__summary-dot {
    background: rgb(139 92 246);
    box-shadow: 0 0 0 0.25rem rgb(139 92 246 / 0.1);
}

.nms-reports__summary-card strong {
    position: relative;
    z-index: 1;
    color: rgb(17 24 39);
    font-size: 1.625rem;
    line-height: 1.15;
}

.nms-reports__summary-card small {
    position: relative;
    z-index: 1;
    overflow: hidden;
    color: rgb(107 114 128);
    font-size: 0.875rem;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nms-reports__report-header {
    padding: 1.125rem 1.25rem;
    border-bottom: 1px solid rgb(229 231 235);
}

.nms-reports__report-header h2 {
    font-size: 1.125rem;
}

.nms-reports__table-wrap {
    max-width: 100%;
    overflow: auto;
}

.nms-reports__table {
    width: 100%;
    min-width: 52rem;
    border-collapse: separate;
    border-spacing: 0;
    color: rgb(55 65 81);
    font-size: 0.875rem;
}

.nms-reports__table th,
.nms-reports__table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgb(229 231 235);
    text-align: left;
    vertical-align: middle;
}

.nms-reports__table th {
    position: sticky;
    z-index: 2;
    top: 0;
    background: rgb(249 250 251);
    color: rgb(75 85 99);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;
}

.nms-reports__table tbody tr {
    transition: background-color 120ms ease;
}

.nms-reports__table tbody tr:nth-child(even) {
    background: rgb(249 250 251 / 0.55);
}

.nms-reports__table tbody tr:hover {
    background: rgb(254 242 242 / 0.85);
}

.nms-reports__table tbody tr:last-child td {
    border-bottom: 0;
}

.nms-reports__table td:first-child > span {
    color: rgb(31 41 55);
    font-weight: 600;
}

.nms-reports__table .is-numeric {
    text-align: right;
    white-space: nowrap;
}

.dark .nms-reports__chooser,
.dark .nms-reports__filter-panel,
.dark .nms-reports__report,
.dark .nms-reports__summary-card {
    border-color: rgb(55 65 81);
    background: rgb(17 24 39);
}

.dark .nms-reports__section-heading h2,
.dark .nms-reports__filter-header h2,
.dark .nms-reports__report-header h2,
.dark .nms-reports__summary-card strong,
.dark .nms-reports__tab-copy strong,
.dark .nms-reports__table td:first-child > span {
    color: white;
}

.dark .nms-reports__section-heading p,
.dark .nms-reports__filter-header p,
.dark .nms-reports__report-header p,
.dark .nms-reports__summary-card small,
.dark .nms-reports__tab-copy small {
    color: rgb(156 163 175);
}

.dark .nms-reports__filter-header,
.dark .nms-reports__report-header,
.dark .nms-reports__table th,
.dark .nms-reports__table td {
    border-color: rgb(55 65 81);
}

.dark .nms-reports__filter-header,
.dark .nms-reports__table th {
    background: rgb(31 41 55);
}

.dark .nms-reports__tab {
    border-color: rgb(55 65 81);
    background: rgb(31 41 55 / 0.75);
}

.dark .nms-reports__tab:hover,
.dark .nms-reports__tab.is-active {
    border-color: rgb(239 68 68 / 0.55);
    background: rgb(69 50 20 / 0.55);
}

.dark .nms-reports__tab-icon,
.dark .nms-reports__filter-icon {
    background: rgb(17 24 39);
    box-shadow: inset 0 0 0 1px rgb(55 65 81);
}

.dark .nms-reports__tab.is-active .nms-reports__tab-icon {
    background: rgb(220 38 38);
}

.dark .nms-reports__summary-topline {
    color: rgb(209 213 219);
}

.dark .nms-reports__table {
    color: rgb(209 213 219);
}

.dark .nms-reports__table tbody tr:nth-child(even) {
    background: rgb(31 41 55 / 0.4);
}

.dark .nms-reports__table tbody tr:hover {
    background: rgb(69 50 20 / 0.38);
}

@media (max-width: 1280px) {
    .nms-reports__tabs,
    .nms-reports__summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 768px) {
    .nms-reports__section-heading,
    .nms-reports__filter-header,
    .nms-reports__report-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .nms-reports__section-heading > p {
        display: none;
    }

}

@media (max-width: 640px) {
    .nms-reports__chooser {
        padding: 1rem;
    }

    .nms-reports__tabs,
    .nms-reports__summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .nms-reports__tab-copy small,
    .nms-reports__summary-card small {
        white-space: normal;
    }

    .nms-reports__filters,
    .nms-reports__filter-header,
    .nms-reports__report-header {
        padding-right: 1rem;
        padding-left: 1rem;
    }

}

@media (prefers-reduced-motion: reduce) {
    .nms-reports__tab,
    .nms-reports__tab-arrow,
    .nms-reports__content {
        transition: none;
    }

    .nms-reports__content.is-loading::before {
        animation: none;
    }
}
