:root {
    color-scheme: light;
    --canvas: #f5f7f9;
    --surface: #fff;
    --ink: #132a31;
    --muted: #52676d;
    --line: #dce5e7;
    --soft-line: #eaf0f1;
    --sidebar: #102c30;
    --sidebar-ink: #e7f0ee;
    --sidebar-muted: #a8c1bf;
    --accent: #006658;
    --accent-hover: #005146;
    --accent-soft: #e6f4ef;
    --success: #226348;
    --success-bg: #e9f6ee;
    --warning: #82431a;
    --warning-bg: #fff1df;
    --danger: #9b2b36;
    --danger-bg: #fff0f1;
    --neutral-bg: #edf2f3;
    --focus: #11766b;
    --radius: 14px;
    --shadow: 0 2px 5px rgb(18 44 48 / 4%);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
    line-height: 1.5;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
}

button, input, select, textarea {
    color: inherit;
    font: inherit;
}

a {
    color: var(--accent);
    text-underline-offset: 0.15em;
}

a:hover {
    color: var(--accent-hover);
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

[hidden] {
    display: none !important;
}

.skip-link {
    position: fixed;
    z-index: 10;
    top: 0.75rem;
    left: 0.75rem;
    transform: translateY(-180%);
    padding: .6rem 1rem;
    border-radius: .5rem;
    color: var(--surface);
    background: var(--accent);
}

.skip-link:focus {
    transform: none;
}

.shell {
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    display: flex;
    flex-direction: column;
    padding: 1.75rem 1rem;
    background: var(--sidebar);
    color: var(--sidebar-ink);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    min-height: 2.75rem;
    text-decoration: none;
    color: inherit;
}

.brand:hover {
    color: inherit;
}

.brand-mark {
    position: relative;
    display: grid;
    flex: 0 0 2.55rem;
    width: 2.55rem;
    height: 2.55rem;
    place-items: center;
    background: #adf0d7;
    color: #154a40;
    border-radius: .75rem;
    box-shadow: inset 0 0 0 1px rgb(20 60 54 / 17%);
}

.brand-mark::before {
    content: "";
    width: 1.125rem;
    height: .75rem;
    border: 1.5px solid currentColor;
    border-top: 0;
    border-radius: 0 0 .15rem .15rem;
    margin-top: .47rem;
}

.brand-mark::after {
    content: "";
    position: absolute;
    top: .68rem;
    width: 1.35rem;
    height: .40rem;
    border: 1.5px solid currentColor;
    border-radius: .19rem .19rem .12rem .12rem;
    transform: perspective(1.3rem) rotateX(27deg);
}

.brand-name {
    display: grid;
    font-size: .94rem;
    font-weight: 730;
    line-height: 1.2;
    letter-spacing: -.018em;
}

.brand-name small {
    margin-top: .26rem;
    color: var(--sidebar-muted);
    font-size: .81rem;
    font-weight: 550;
}

.sidebar-nav {
    display: grid;
    align-content: start;
    gap: .32rem;
    margin-top: 2.65rem;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: .68rem;
    min-height: 2.85rem;
    padding: .5rem .75rem;
    border: 1px solid transparent;
    border-radius: .6rem;
    color: var(--sidebar-muted);
    font-size: .925rem;
    font-weight: 590;
    text-decoration: none;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
    color: var(--sidebar-ink);
    background: #224247;
}

.nav-link[aria-current="page"] {
    border-color: #365b5e;
    font-weight: 680;
}

.sidebar :focus-visible {
    outline-color: #adf0d7;
}

.nav-icon {
    display: block;
    position: relative;
    flex: 0 0 1.01rem;
    width: 1.01rem;
    height: 1.01rem;
    opacity: .9;
}

.icon-stores {
    border: 1.5px solid currentColor;
    border-radius: .19rem;
    background:
        linear-gradient(currentColor, currentColor) left .18rem top .25rem / .65rem 1px no-repeat,
        linear-gradient(currentColor, currentColor) left .18rem top .5rem / .44rem 1px no-repeat;
}

.icon-alerts {
    width: .82rem;
    flex-basis: .82rem;
    margin-inline: .09rem;
    height: .99rem;
    border: 1.5px solid currentColor;
    border-radius: .48rem .48rem .24rem .24rem;
    clip-path: inset(0 0 .12rem);
}

.icon-alerts::before {
    content: "";
    display: block;
    position: absolute;
    left: 50%;
    bottom: .02rem;
    width: .25rem;
    height: .12rem;
    transform: translateX(-50%);
    background: currentColor;
    border-radius: 1px;
}

.icon-sources {
    border: 1.5px solid currentColor;
    border-radius: .23rem;
    background:
        linear-gradient(currentColor, currentColor) center top .21rem / .5rem 1px no-repeat,
        linear-gradient(currentColor, currentColor) center top .43rem / .5rem 1px no-repeat,
        linear-gradient(currentColor, currentColor) center top .65rem / .5rem 1px no-repeat;
}

.workspace {
    min-width: 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 4.2rem;
    gap: 1rem;
    padding: .7rem clamp(1rem, 3vw, 2.9rem);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.topbar-label {
    color: var(--muted);
    font-size: .875rem;
    font-weight: 630;
}

.session {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    flex-shrink: 0;
}

.identity {
    display: grid;
    width: 1.95rem;
    height: 1.95rem;
    place-items: center;
    border-radius: .55rem;
    color: var(--accent);
    background: var(--accent-soft);
    font-size: .78rem;
    font-weight: 760;
    text-transform: uppercase;
}

.session form {
    display: inline-flex;
}

.session button {
    border: 0;
    background: transparent;
    padding: .37rem .3rem;
    color: var(--muted);
    cursor: pointer;
    font-size: .875rem;
    font-weight: 600;
}

.session button:hover {
    color: var(--accent);
    text-decoration: underline;
}

.page {
    width: 100%;
    max-width: 105rem;
    margin-inline: auto;
    padding: clamp(1rem, 3vw, 2.9rem);
}

.page-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: start;
    column-gap: 1.25rem;
    row-gap: .85rem;
    margin-bottom: 1.5rem;
}

.page-head h1, .login-card h1 {
    margin: 0;
    letter-spacing: -.044em;
    line-height: 1.1;
    font-size: clamp(1.95rem, 3vw, 2.55rem);
    overflow-wrap: anywhere;
}

.page-head p {
    margin: .45rem 0 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.page-head > div {
    min-width: 0;
}

.crumb {
    margin: 0 0 .65rem;
    font-size: .875rem;
}

.crumb a {
    font-weight: 610;
}

.button {
    display: inline-flex;
    min-height: 2.58rem;
    align-items: center;
    justify-content: center;
    gap: .43rem;
    padding: .47rem .9rem;
    cursor: pointer;
    border-radius: .57rem;
    border: 1px solid transparent;
    font-size: .875rem;
    font-weight: 675;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
    text-decoration: none;
    background: var(--surface);
    color: var(--ink);
}

.button-primary {
    color: #fff;
    background: var(--accent);
}

.button-primary:hover {
    background: var(--accent-hover);
    color: #fff;
}

.button-secondary {
    border-color: var(--line);
    color: var(--ink);
}

.button-secondary:hover {
    border-color: #9ebcba;
    background: #f2f8f6;
    color: var(--accent-hover);
}

.button-danger {
    border-color: #e8c9cc;
    color: var(--danger);
}

.button-danger:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.button-small {
    min-height: 2.15rem;
    padding: .3rem .62rem;
    font-size: .85rem;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
}

.action-row form {
    margin: 0;
}

.metrics, .facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .9rem;
    margin: 0 0 1.15rem;
}

.metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric, .fact {
    min-width: 0;
    min-height: 6.9rem;
    padding: .95rem 1.05rem;
    overflow-wrap: anywhere;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.metric {
    color: var(--ink);
    text-decoration: none;
}

.metric:hover {
    border-color: #9ebcba;
    color: var(--ink);
    background: #fbfdfc;
}

.metric small, .fact dt {
    display: block;
    color: var(--muted);
    font-size: .875rem;
    font-weight: 630;
}

.metric strong, .fact dd {
    display: block;
    margin: .35rem 0 0;
    font-size: clamp(1.3rem, 2.55vw, 2.02rem);
    font-weight: 750;
    letter-spacing: -.045em;
    line-height: 1.13;
    font-variant-numeric: tabular-nums;
}

.fact dd + dd {
    margin-top: .4rem;
    font-size: .81rem;
    font-weight: 520;
    letter-spacing: 0;
}

.fact-date dd:first-of-type {
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    letter-spacing: -.02em;
}

.metric-warning strong {
    color: var(--warning);
}

.metric-danger strong {
    color: var(--danger);
}

.surface {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.surface + .surface {
    margin-top: 1.05rem;
}

.surface-head {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem 1rem;
    padding: .95rem 1.05rem;
}

.surface-head h2 {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 720;
    letter-spacing: -.018em;
}

.surface-head p {
    margin: .22rem 0 0;
    color: var(--muted);
    font-size: .875rem;
}

.surface-body {
    padding: 1.05rem;
    border-top: 1px solid var(--soft-line);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: .6rem;
    width: min(100%, 35rem);
}

.filters .field {
    min-width: 0;
    flex: 1 1 10rem;
}

.field label, .field-label {
    display: block;
    margin: 0 0 .26rem;
    color: var(--ink);
    font-size: .875rem;
    font-weight: 650;
}

.field input, .field select, .field textarea {
    width: 100%;
    min-width: 0;
    min-height: 2.58rem;
    padding: .47rem .64rem;
    border: 1px solid #aebfc2;
    border-radius: .55rem;
    background: var(--surface);
    color: var(--ink);
    font-size: .925rem;
    line-height: 1.4;
}

.field input::placeholder {
    color: #61767c;
}

.field textarea {
    min-height: 5.7rem;
    resize: vertical;
}

.field select {
    appearance: none;
    padding-right: 1.85rem;
    background:
        linear-gradient(45deg, transparent 45%, var(--muted) 50%, var(--muted) 63%, transparent 69%) right .88rem center / .35rem .36rem no-repeat,
        linear-gradient(-45deg, transparent 45%, var(--muted) 50%, var(--muted) 63%, transparent 69%) right .58rem center / .35rem .36rem no-repeat,
        var(--surface);
}

.field-help {
    display: block;
    margin: .35rem 0 0;
    color: var(--muted);
    font-size: .835rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem 1rem;
}

.field-wide,
.form-actions {
    grid-column: 1 / -1;
}

.form-actions {
    margin-top: .15rem;
}

.details-form > summary {
    cursor: pointer;
    list-style: none;
}

.details-form > summary::-webkit-details-marker {
    display: none;
}

.details-form .when-open, .details-form[open] .when-closed {
    display: none;
}

.details-form[open] .when-open {
    display: inline;
}

.details-form[open] > summary {
    margin-bottom: .55rem;
}

.table-scroll {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    border-top: 1px solid var(--soft-line);
}

.table-scroll:focus-visible {
    outline-offset: -3px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.shop-table {
    min-width: 46rem;
}

.data-table {
    min-width: 37rem;
}

thead {
    background: #f7faf9;
}

th, td {
    padding: .85rem .92rem;
    text-align: left;
    vertical-align: middle;
}

th:first-child, td:first-child {
    padding-left: 1.05rem;
}

th:last-child, td:last-child {
    padding-right: 1.05rem;
}

th {
    color: var(--muted);
    font-size: .835rem;
    font-weight: 690;
    white-space: nowrap;
}

tbody tr + tr {
    border-top: 1px solid var(--soft-line);
}

tbody tr:hover {
    background: #fafcfb;
}

td {
    font-size: .925rem;
}

td .secondary, .cell-secondary {
    display: block;
    margin-top: .21rem;
    color: var(--muted);
    font-size: .825rem;
    overflow-wrap: anywhere;
}

.cell-name {
    font-weight: 730;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.cell-name:hover {
    text-decoration: underline;
}

.store-persona {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-width: 8.5rem;
}

.store-avatar {
    display: grid;
    flex: 0 0 2.15rem;
    height: 2.15rem;
    place-items: center;
    border-radius: .55rem;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: .84rem;
    font-weight: 750;
    text-transform: uppercase;
}

.badge {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: .34rem;
    padding: .22rem .5rem;
    border-radius: .34rem;
    background: var(--neutral-bg);
    color: #445c62;
    font-size: .815rem;
    font-weight: 665;
    line-height: 1.4;
}

.badge-success {
    color: var(--success);
    background: var(--success-bg);
}

.badge-warning {
    color: var(--warning);
    background: var(--warning-bg);
}

.badge-danger {
    color: var(--danger);
    background: var(--danger-bg);
}

.badge-info {
    color: var(--accent-hover);
    background: var(--accent-soft);
}

.security-counts {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
}

.empty {
    padding: 1.45rem 1.05rem;
    border-top: 1px solid var(--soft-line);
    color: var(--muted);
}

.empty strong {
    display: block;
    color: var(--ink);
    font-weight: 690;
}

.empty p {
    margin: .27rem 0 0;
}

.notice {
    margin: 0 0 .8rem;
    padding: .67rem .8rem;
    background: var(--accent-soft);
    color: var(--accent-hover);
    border: 1px solid #b6dcd0;
    border-radius: .65rem;
    overflow-wrap: anywhere;
}

.notice-danger {
    color: var(--danger);
    background: var(--danger-bg);
    border-color: #e8c5ca;
}

.notice-warning {
    color: var(--warning);
    background: var(--warning-bg);
    border-color: #e4cfae;
}

.notice p, .description {
    margin: .35rem 0 0;
}

.notice strong {
    font-weight: 730;
}

.credential {
    display: grid;
    gap: .55rem;
    padding: .8rem;
    margin-bottom: 1rem;
    border: 1px solid #96c5b6;
    border-radius: .65rem;
    background: #edf8f4;
}

.credential p {
    margin: 0;
}

.credential-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem;
}

code {
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.credential code {
    padding: .28rem .45rem;
    border: 1px solid #c7dfd7;
    border-radius: .4rem;
    background: var(--surface);
    user-select: all;
}

.listing {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--soft-line);
}

.listing-item {
    padding: 1rem 1.05rem;
}

.listing-item + .listing-item {
    border-top: 1px solid var(--soft-line);
}

.listing-item h3 {
    margin: 0;
    font-size: 1rem;
    overflow-wrap: anywhere;
}

.listing-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .6rem;
    margin: .35rem 0 0;
    color: var(--muted);
    font-size: .87rem;
}

.listing-actions {
    margin-top: .55rem;
}

.subsection {
    margin-top: 1rem;
}

.login-page {
    display: grid;
    align-content: center;
    min-height: 100vh;
    padding: 1rem;
    background: radial-gradient(ellipse at 35% 15%, #dceee9, transparent 70%), var(--canvas);
}

.login-card {
    width: min(100%, 26rem);
    margin-inline: auto;
    padding: clamp(1.2rem, 5vw, 2.35rem);
}

.login-card .brand {
    color: var(--ink);
}

.login-card .brand-name small {
    color: var(--muted);
}

.login-card h1 {
    margin: 1.3rem 0 1.2rem;
    font-size: 1.85rem;
}

.login-card form {
    display: grid;
    gap: 1rem;
}

.login-card .button {
    width: 100%;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    margin: -1px;
    clip-path: inset(50%);
    white-space: nowrap;
}

@media (max-width: 76rem) {
    .shell {
        grid-template-columns: 13rem minmax(0, 1fr);
    }

    .metrics, .facts {
        gap: .65rem;
    }

    .metric, .fact {
        padding-inline: .8rem;
    }
}

@media (max-width: 60rem) {
    .metrics, .facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .metric, .fact {
        min-height: auto;
    }
}

@media (max-width: 48rem) {
    .shell {
        display: block;
    }

    .sidebar {
        padding: .8rem 1rem .65rem;
    }

    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: .25rem;
        margin-top: .65rem;
    }

    .nav-link {
        min-height: 2.32rem;
        gap: .35rem;
        padding: .35rem .53rem;
        font-size: .85rem;
    }

    .topbar {
        min-height: 3.15rem;
        padding-block: .35rem;
    }

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

@media (max-width: 32rem) {
    .page-head {
        margin-bottom: 1rem;
    }

    .surface-head, .surface-body, .empty, .listing-item {
        padding-inline: .8rem;
    }

    .filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shop-table, .data-table {
        min-width: 0;
    }

    .responsive-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }

    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
    }

    .responsive-table tr {
        padding: .55rem .8rem;
    }

    .responsive-table td {
        display: grid;
        grid-template-columns: minmax(5.2rem, .9fr) minmax(0, 1.35fr);
        gap: .5rem;
        align-items: baseline;
        padding: .36rem 0;
    }

    .responsive-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: .83rem;
        font-weight: 640;
    }

    .responsive-table td.cell-identity {
        display: block;
        padding-top: .35rem;
    }

    .responsive-table td.cell-identity::before {
        display: none;
    }
}

.muted {
    color: var(--muted);
}

.listing-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem 1rem;
}

.alert-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: .85rem 1rem;
}

.alert-categories, .alert-component {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem .55rem;
}

.alert-categories [aria-current="true"] {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-hover);
}

.alert-controls .filters {
    flex: 0 1 auto;
    width: auto;
    max-width: 100%;
}

.alert-controls .filters .field {
    min-width: min(12rem, 100%);
    max-width: 100%;
}

.alert-controls .filters .alert-page-size {
    flex: 0 1 auto;
    min-width: 0;
}

.alert-component {
    margin-bottom: .45rem;
    overflow-wrap: anywhere;
}

@media (max-width: 32rem) {
    .alert-controls .filters {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
    }
}

.preserved-text {
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.form-disclosure {
    margin-top: 1.15rem;
    scroll-margin-top: 1rem;
}

.form-disclosure[open] .surface {
    margin-top: .55rem;
}

.section-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16.5rem, .56fr);
    gap: 1.05rem;
    align-items: start;
}

.section-layout > :first-child {
    min-width: 0;
}

.section-layout > .surface + .surface {
    margin-top: 0;
}

.overflow-cell {
    max-width: 17rem;
    overflow-wrap: anywhere;
}

.changelog summary {
    cursor: pointer;
    color: var(--accent);
    font-weight: 640;
}

.changelog p {
    margin: .4rem 0;
}

@media (max-width: 72rem) {
    .section-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

.table-sort {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: inherit;
    text-decoration: none;
}

.table-sort:hover, [aria-sort] .table-sort {
    color: var(--accent);
}

.table-sort:hover {
    text-decoration: underline;
}

.sort-indicator {
    display: inline-grid;
    gap: 2px;
}

.sort-indicator::before, .sort-indicator::after {
    content: "";
    border-inline: 3px solid transparent;
    opacity: .42;
}

.sort-indicator::before {
    border-bottom: 4px solid currentColor;
}

.sort-indicator::after {
    border-top: 4px solid currentColor;
}

.sort-asc::before, .sort-desc::after {
    opacity: 1;
}

.module-page-size, .pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: .6rem 1rem;
}

.pagination {
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: .875rem;
}

.pagination p {
    margin: 0;
}

.module-sort-mobile {
    display: none;
}

@media (max-width: 32rem) {
    .responsive-table thead .table-sort {
        visibility: hidden;
    }

    .module-sort-mobile {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: .6rem 1rem;
        padding: .6rem .8rem;
        border-top: 1px solid var(--soft-line);
        color: var(--muted);
        font-size: .875rem;
    }

    .module-sort-mobile .table-sort {
        min-height: 2rem;
        font-weight: 650;
    }
}
