:root {
    --navy-950: #0d1530;
    --navy-900: #141e3c;
    --navy-800: #1c294d;
    --navy-700: #263760;
    --blue-700: #175fbf;
    --blue-600: #2675db;
    --blue-100: #eaf3ff;
    --ink-900: #172033;
    --ink-700: #455168;
    --ink-500: #6d788c;
    --line: #e0e5ed;
    --line-strong: #cdd4df;
    --surface: #ffffff;
    --canvas: #f4f6f9;
    --green: #16815e;
    --green-soft: #e7f7f1;
    --red: #c53b4b;
    --red-soft: #fff0f2;
    --amber: #a96309;
    --amber-soft: #fff5df;
    --shadow: 0 12px 32px rgba(18, 31, 55, 0.09);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink-900);
    background: var(--canvas);
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--canvas);
    color: var(--ink-900);
}

button,
input,
select {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(38, 117, 219, 0.3);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: -64px;
    left: 16px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink-900);
    box-shadow: var(--shadow);
    transition: top 150ms ease;
}

.skip-link:focus {
    top: 16px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--blue-600);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.muted {
    color: var(--ink-500);
    line-height: 1.6;
}

.brand-mark {
    display: grid;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 13px;
    background: linear-gradient(145deg, #3f89e8, #175fbf);
    color: white;
    font-size: 0.86rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    box-shadow: 0 8px 22px rgba(19, 90, 182, 0.35);
}

.brand-mark--large {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    font-size: 1.1rem;
}

.brand-logo {
    display: block;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.brand-logo--large {
    width: 62px;
    height: 62px;
}

.button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 750;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.button:active {
    transform: translateY(1px);
}

.button--primary {
    background: var(--blue-700);
    color: white;
    box-shadow: 0 6px 16px rgba(23, 95, 191, 0.2);
}

.button--primary:hover {
    background: #0d53aa;
}

.button--secondary {
    border-color: var(--line-strong);
    background: var(--surface);
    color: var(--ink-700);
}

.button--secondary:hover,
.button--quiet:hover {
    border-color: #b9c2d1;
    background: #f8f9fb;
    color: var(--ink-900);
}

.button--quiet {
    border-color: transparent;
    background: transparent;
    color: var(--ink-700);
    box-shadow: none;
}

.button--danger {
    background: var(--red);
    color: white;
}

.button--danger:hover {
    background: #a92f3d;
}

.button--wide {
    width: 100%;
}

.icon-button {
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink-700);
    font-size: 1.2rem;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot--muted {
    background: #8b98ae;
    box-shadow: 0 0 0 4px rgba(139, 152, 174, 0.13);
}

.status-dot--active {
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(22, 129, 94, 0.12);
}

.status-dot--danger {
    background: var(--red);
    box-shadow: 0 0 0 4px rgba(197, 59, 75, 0.12);
}

/* Authentication */
.auth-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 32px;
    background:
        radial-gradient(circle at 12% 18%, rgba(48, 108, 198, 0.28), transparent 30%),
        radial-gradient(circle at 84% 82%, rgba(37, 70, 135, 0.28), transparent 30%),
        var(--navy-950);
}

.auth-shell {
    display: grid;
    width: min(940px, 100%);
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

.auth-brand {
    display: flex;
    min-height: 590px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 64px;
    color: white;
}

.auth-brand h1 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.auth-brand .brand-mark,
.auth-brand .brand-logo {
    margin-bottom: 42px;
}

.auth-brand .eyebrow {
    color: #8dbcf7;
}

.auth-intro {
    max-width: 420px;
    margin: 22px 0 0;
    color: #b9c4da;
    font-size: 1.03rem;
    line-height: 1.7;
}

.connection-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 48px;
    color: #a9b5cb;
    font-size: 0.83rem;
}

.service-statuses {
    display: grid;
    gap: 14px;
    margin-top: 48px;
}

.service-statuses .connection-note {
    margin-top: 0;
}

.auth-card {
    align-self: stretch;
    padding: 66px 58px;
    background: var(--surface);
}

.auth-card h2 {
    margin: 0 0 10px;
    font-size: 1.9rem;
    letter-spacing: -0.035em;
}

.auth-form {
    display: grid;
    gap: 18px;
    margin-top: 30px;
}

.auth-form label,
.field {
    display: grid;
    gap: 8px;
    color: var(--ink-700);
    font-size: 0.82rem;
    font-weight: 700;
}

.auth-form input,
.field input,
.field select,
.filters select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: var(--surface);
    color: var(--ink-900);
}

.alert {
    margin-bottom: 24px;
    padding: 12px 14px;
    border-radius: 9px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.alert--danger {
    border: 1px solid #f2b8c0;
    background: var(--red-soft);
    color: #8d2734;
}

/* Dashboard shell */
.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    display: flex;
    width: 248px;
    flex-direction: column;
    padding: 22px 16px;
    background: var(--navy-900);
    color: white;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand strong,
.sidebar-brand span {
    display: block;
}

.sidebar-brand strong {
    font-size: 0.92rem;
}

.sidebar-brand span {
    margin-top: 3px;
    color: #9caac4;
    font-size: 0.72rem;
}

.side-nav {
    display: grid;
    gap: 7px;
    margin-top: 28px;
}

.side-nav__item {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 12px;
    border-radius: 10px;
    color: #b8c4d8;
    font-size: 0.86rem;
    font-weight: 650;
    text-decoration: none;
}

.side-nav__item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: white;
}

.side-nav__item--active {
    background: rgba(65, 137, 232, 0.18);
    color: white;
}

.side-nav__icon {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    color: #8fbef8;
    font-weight: 900;
}

.side-nav__count {
    min-width: 26px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #aebbd0;
    font-size: 0.7rem;
    text-align: center;
}

.side-nav__count--alert:not(:empty) {
    color: #ffc5cd;
}

.sidebar-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: auto;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-note .status-dot {
    margin-top: 5px;
}

.sidebar-note--services {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr);
    row-gap: 13px;
}

.sidebar-note strong,
.sidebar-note span {
    display: block;
}

.sidebar-note strong {
    font-size: 0.78rem;
}

.sidebar-note span {
    margin-top: 4px;
    color: #98a8c3;
    font-size: 0.68rem;
    line-height: 1.4;
}

.main-column {
    min-width: 0;
    margin-left: 248px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
}

.topbar-context span,
.topbar-context strong {
    display: block;
}

.topbar-context span {
    color: var(--ink-500);
    font-size: 0.68rem;
}

.topbar-context strong {
    margin-top: 2px;
    font-size: 0.84rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.topbar-user {
    padding-right: 12px;
    border-right: 1px solid var(--line);
    color: var(--ink-700);
    font-size: 0.82rem;
    font-weight: 700;
}

.mobile-menu {
    display: none;
}

.content {
    width: min(1680px, 100%);
    margin: 0 auto;
    padding: 34px 30px 56px;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.page-heading h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.8rem);
    letter-spacing: -0.05em;
    line-height: 1;
}

.page-subtitle {
    margin: 12px 0 0;
    color: var(--ink-500);
    font-size: 0.9rem;
}

.heading-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
}

.reference-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
    padding: 13px 16px;
    border: 1px solid #cadcf5;
    border-radius: var(--radius-md);
    background: #f1f6fd;
    color: #385879;
}

.reference-banner__icon {
    display: grid;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    background: var(--blue-700);
    color: white;
    font-family: Georgia, serif;
    font-size: 0.78rem;
    font-weight: 700;
}

.reference-banner div {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 10px;
    align-items: baseline;
    min-width: 0;
    font-size: 0.8rem;
}

.reference-banner__time {
    margin-left: auto;
    color: #607997;
    font-size: 0.72rem;
    white-space: nowrap;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.metric-card {
    min-width: 0;
    padding: 21px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: 0 4px 16px rgba(18, 31, 55, 0.035);
}

.metric-label,
.metric-detail {
    display: block;
}

.metric-label {
    color: var(--ink-500);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.metric-value {
    display: block;
    margin-top: 10px;
    overflow: hidden;
    font-size: clamp(1.55rem, 3vw, 2rem);
    letter-spacing: -0.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-value--positive {
    color: var(--green);
}

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

.metric-detail {
    margin-top: 9px;
    overflow: hidden;
    color: var(--ink-500);
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-detail .status-dot {
    margin-right: 7px;
}

.account-panel {
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 5px 18px rgba(18, 31, 55, 0.04);
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.search-field {
    display: flex;
    width: min(520px, 100%);
    min-height: 42px;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    color: var(--ink-500);
    transition: border 150ms ease, box-shadow 150ms ease;
}

.search-field:focus-within {
    border-color: var(--blue-600);
    box-shadow: 0 0 0 3px rgba(38, 117, 219, 0.12);
}

.search-field input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink-900);
    font-size: 0.83rem;
}

.search-field input::placeholder {
    color: #8a95a8;
}

.filters {
    display: flex;
    flex: 0 0 auto;
    gap: 9px;
}

.filters select {
    min-width: 140px;
    min-height: 42px;
    font-size: 0.8rem;
}

.table-meta {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-500);
    font-size: 0.74rem;
}

.text-button {
    padding: 4px;
    border: 0;
    background: transparent;
    color: var(--blue-700);
    font-size: 0.75rem;
    font-weight: 700;
}

.table-scroll {
    overflow: auto;
}

table {
    width: 100%;
    min-width: 1390px;
    border-collapse: collapse;
    table-layout: fixed;
}

th,
td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fafbfc;
    color: var(--ink-500);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

th:nth-child(1) { width: 210px; }
th:nth-child(2) { width: 100px; }
th:nth-child(3) { width: 135px; }
th:nth-child(4) { width: 220px; }
th:nth-child(5) { width: 130px; }
th:nth-child(6) { width: 150px; }
th:nth-child(7) { width: 195px; }
th:nth-child(8) { width: 220px; }
th:nth-child(9) { width: 100px; }
th:nth-child(10) { width: 60px; }

td {
    overflow: hidden;
    color: #38445a;
    font-size: 0.77rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

tbody tr {
    transition: background 120ms ease;
}

tbody tr:hover {
    background: #f8fafc;
}

tbody tr.row--suspended {
    background: var(--red-soft);
}

tbody tr.row--suspended:hover {
    background: #ffe8eb;
}

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

.sort-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

.sort-button span {
    color: #a2adbd;
}

.sort-button.is-sorted span {
    color: var(--blue-700);
}

.domain-cell strong {
    display: block;
    overflow: hidden;
    color: var(--blue-700);
    font-size: 0.82rem;
    text-overflow: ellipsis;
}

.domain-cell span {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: var(--ink-500);
    font-size: 0.67rem;
    text-overflow: ellipsis;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.69rem;
    font-weight: 750;
}

.status-pill--active {
    background: var(--green-soft);
    color: #116a4e;
}

.status-pill--suspended {
    background: #ffdce1;
    color: #a02e3c;
}

.storage-cell {
    display: grid;
    gap: 7px;
}

.storage-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--ink-700);
    font-size: 0.69rem;
}

.storage-copy span:last-child {
    color: var(--ink-500);
}

.storage-progress {
    display: block;
    width: 100%;
    height: 5px;
    appearance: none;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: #e8ecf2;
}

.storage-progress::-webkit-progress-bar {
    border-radius: 999px;
    background: #e8ecf2;
}

.storage-progress::-webkit-progress-value {
    border-radius: 999px;
    background: var(--blue-600);
}

.storage-progress::-moz-progress-bar {
    border-radius: 999px;
    background: var(--blue-600);
}

.storage-progress.is-warning::-webkit-progress-value,
.storage-progress.is-warning::-moz-progress-bar {
    background: var(--amber);
}

.storage-progress.is-danger::-webkit-progress-value,
.storage-progress.is-danger::-moz-progress-bar {
    background: var(--red);
}

.row-actions {
    position: relative;
}

.action-button {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-500);
    font-size: 1rem;
    font-weight: 800;
}

.action-button:hover {
    border-color: var(--line);
    background: var(--surface);
    color: var(--ink-900);
}

.action-menu {
    position: fixed;
    z-index: 30;
    display: none;
    min-width: 140px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.action-menu.is-open {
    display: grid;
}

.action-menu button {
    padding: 9px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ink-700);
    font-size: 0.77rem;
    text-align: left;
}

.action-menu button:hover {
    background: #f4f6f9;
    color: var(--ink-900);
}

.action-menu .delete-action {
    color: var(--red);
}

.empty-state {
    padding: 62px 24px;
    color: var(--ink-500);
    text-align: center;
}

.empty-state > span {
    display: grid;
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    place-items: center;
    border-radius: 50%;
    background: #edf1f6;
    font-size: 1.4rem;
}

.empty-state strong {
    display: block;
    color: var(--ink-900);
}

.empty-state p {
    margin: 7px 0 0;
    font-size: 0.8rem;
}

/* Modals and toast */
.modal {
    width: min(720px, calc(100% - 32px));
    max-height: calc(100vh - 40px);
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: var(--radius-lg);
    background: transparent;
    box-shadow: var(--shadow);
}

.modal--small {
    width: min(480px, calc(100% - 32px));
}

.modal::backdrop {
    background: rgba(11, 20, 39, 0.62);
    backdrop-filter: blur(3px);
}

.modal-card {
    display: flex;
    max-height: calc(100vh - 40px);
    flex-direction: column;
    margin: 0;
    background: var(--surface);
}

.modal-header,
.modal-footer {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
}

.modal-header {
    border-bottom: 1px solid var(--line);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
}

.modal-body {
    overflow: auto;
    padding: 24px;
    color: var(--ink-700);
    font-size: 0.88rem;
    line-height: 1.6;
}

.modal-footer {
    justify-content: flex-end;
    border-top: 1px solid var(--line);
    background: #fafbfc;
}

.modal-footer__danger {
    margin-right: auto;
}

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

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

.field > span {
    color: var(--red);
}

.toast-region {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 60;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100% - 48px));
}

.toast {
    padding: 13px 16px;
    border: 1px solid #bcdcca;
    border-radius: 10px;
    background: #eefaf4;
    color: #176044;
    box-shadow: var(--shadow);
    font-size: 0.8rem;
    animation: toast-in 180ms ease-out;
}

.toast--danger {
    border-color: #f0bec5;
    background: var(--red-soft);
    color: #8d2734;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

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

    .table-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .search-field {
        width: 100%;
    }

    .filters select {
        width: 100%;
    }

    .filters label {
        flex: 1 1 0;
    }
}

@media (max-width: 780px) {
    .auth-page {
        display: block;
        padding: 0;
        background: var(--navy-950);
    }

    .auth-shell {
        display: block;
        width: 100%;
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .auth-brand {
        min-height: auto;
        padding: 46px 28px 38px;
    }

    .auth-brand .brand-mark,
    .auth-brand .brand-logo {
        margin-bottom: 26px;
    }

    .auth-intro {
        margin-top: 15px;
    }

    .connection-note {
        margin-top: 28px;
    }

    .service-statuses {
        margin-top: 28px;
    }

    .auth-card {
        padding: 38px 28px 48px;
        border-radius: 24px 24px 0 0;
    }

    .sidebar {
        display: none;
    }

    .sidebar.is-mobile-open {
        display: flex;
        width: min(300px, 86vw);
        box-shadow: 20px 0 60px rgba(8, 15, 31, 0.35);
    }

    .main-column {
        margin-left: 0;
    }

    .mobile-menu {
        display: grid;
    }

    .topbar {
        padding: 0 16px;
    }

    .topbar-context {
        margin-right: auto;
        margin-left: 10px;
    }

    .topbar-user {
        display: none;
    }

    .content {
        padding: 26px 16px 42px;
    }

    .page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .heading-actions .button {
        flex: 1 1 0;
    }

    .reference-banner {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .reference-banner__time {
        width: 100%;
        margin-left: 36px;
    }

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

    .metric-card {
        padding: 17px;
    }

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

    .modal-body,
    .modal-header,
    .modal-footer {
        padding-right: 18px;
        padding-left: 18px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .field--wide {
        grid-column: auto;
    }
}

@media (max-width: 480px) {
    .topbar-context {
        display: none;
    }

    .topbar-actions {
        margin-left: auto;
    }

    .metrics {
        grid-template-columns: 1fr;
    }

    .metric-card {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 2px 14px;
    }

    .metric-value {
        grid-row: 1 / span 2;
        grid-column: 2;
        margin: 0;
    }

    .metric-detail {
        margin-top: 4px;
    }

    .heading-actions {
        flex-direction: column-reverse;
    }

    .filters {
        grid-template-columns: 1fr;
    }

    .reference-banner__time {
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
