:root {
  color-scheme: light;
  --ink: #18212f;
  --ink-soft: #536174;
  --ink-muted: #748196;
  --canvas: #f4f6f8;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --line: #dce2e9;
  --line-strong: #c7d0db;
  --brand: #3158d4;
  --brand-strong: #2446b8;
  --brand-soft: #edf2ff;
  --success: #147a4a;
  --success-soft: #eaf8f0;
  --warning: #946200;
  --warning-soft: #fff7dc;
  --danger: #b4232f;
  --danger-strong: #921d27;
  --danger-soft: #fff0f1;
  --info: #1769aa;
  --info-soft: #edf7ff;
  --focus: #2f6feb;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgb(24 33 47 / 0.06), 0 4px 14px rgb(24 33 47 / 0.04);
  --shadow-md: 0 14px 40px rgb(24 33 47 / 0.1);
  --content: 1120px;
}

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

html {
  min-width: 320px;
  background: var(--canvas);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
}

svg {
  display: block;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 45%, transparent);
  outline-offset: 3px;
}

::selection {
  background: #cbd8ff;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  transform: translateY(-150%);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: white;
  padding: 10px 14px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.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;
}

/*
 * Standalone brand lockup, used only by the sign-in page. The primary
 * navigation draws its wordmark from /admin-navigation.css and not from here.
 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--ink);
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-size: 13px;
  letter-spacing: -0.06em;
}

.admin-main {
  width: min(calc(100% - 48px), var(--content));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.page-header__copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.page-subtitle {
  max-width: 680px;
  margin: 9px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.page-header__actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.button-row--end {
  justify-content: flex-end;
}

.btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--brand);
  color: white;
}

.btn--primary:hover {
  background: var(--brand-strong);
}

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

.btn--secondary:hover {
  border-color: #aeb9c6;
  background: var(--surface-subtle);
}

.btn--quiet {
  background: transparent;
  color: var(--ink-soft);
}

.btn--quiet:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.btn--danger {
  border-color: #f0c5ca;
  background: var(--danger-soft);
  color: var(--danger);
}

.btn--danger:hover {
  border-color: #e4a9b0;
  background: #ffe3e6;
  color: var(--danger-strong);
}

.btn--sm {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.panel,
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel {
  overflow: hidden;
}

.panel + .panel,
.section + .section {
  margin-top: 24px;
}

.section-gap {
  margin-top: 24px;
}

.panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 20px 22px;
}

.panel__body {
  padding: 22px;
}

.panel__title,
.section-title {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.panel__description,
.section-description {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stack--sm {
  gap: 10px;
}

.grid {
  display: grid;
  gap: 20px;
}

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

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

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

.stat-card {
  display: block;
  min-height: 142px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
}

a.stat-card:hover {
  border-color: #b9c6d6;
  box-shadow: 0 8px 24px rgb(24 33 47 / 0.08);
}

.stat-card__label {
  display: block;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.stat-card__value {
  display: block;
  margin-top: 12px;
  color: var(--ink);
  font-size: 34px;
  font-weight: 780;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat-card__action {
  display: block;
  margin-top: 16px;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 700;
}

.alert-stack {
  display: grid;
  gap: 10px;
  margin: 0 0 24px;
}

.alert {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  border: 1px solid;
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  font-size: 14px;
}

.alert::before {
  font-weight: 800;
}

.alert--success {
  border-color: #acd9bd;
  background: var(--success-soft);
  color: var(--success);
}

.alert--success::before {
  content: "✓";
}

.alert--error {
  border-color: #edb8be;
  background: var(--danger-soft);
  color: var(--danger);
}

.alert--error::before {
  content: "!";
}

.alert--info {
  border-color: #b8d7ed;
  background: var(--info-soft);
  color: var(--info);
}

.alert--info::before {
  content: "i";
}

.alert--warning {
  border-color: #ead28b;
  background: var(--warning-soft);
  color: var(--warning);
}

.alert--warning::before {
  content: "!";
}

.field {
  display: grid;
  gap: 6px;
}

.field__label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.field__required {
  color: var(--danger);
}

.field__hint {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  padding: 9px 11px;
  font-size: 14px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.input,
.select {
  min-height: 42px;
}

.textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.55;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: #aab6c5;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--focus);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent);
}

.input::placeholder,
.textarea::placeholder {
  color: #919daf;
}

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

.form-grid__wide {
  grid-column: 1 / -1;
}

.disclosure-form {
  margin-top: 18px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
  color: var(--ink-muted);
  padding: 12px 18px;
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.065em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 15px 18px;
  color: var(--ink);
  font-size: 14px;
  vertical-align: middle;
}

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

.data-table tbody tr:hover td {
  background: #fbfcfe;
}

.data-table__primary {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.data-table__primary:hover {
  color: var(--brand-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.muted,
.meta-text {
  color: var(--ink-muted);
}

.nowrap {
  white-space: nowrap;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status--success {
  background: var(--success-soft);
  color: var(--success);
}

.status--pending {
  background: var(--warning-soft);
  color: var(--warning);
}

.status--neutral {
  background: #eef1f5;
  color: var(--ink-soft);
}

.status--info {
  background: var(--info-soft);
  color: var(--info);
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  padding: 42px 24px;
  text-align: center;
}

.empty-state__icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #e9edf2;
  color: var(--ink-soft);
  font-size: 18px;
  font-weight: 800;
}

.empty-state__title {
  margin: 0;
  font-size: 16px;
  font-weight: 760;
}

.empty-state__description {
  max-width: 520px;
  margin: 6px auto 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.empty-state .btn {
  margin-top: 18px;
}

.disclosure {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 14px 18px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 740;
  list-style: none;
}

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

.disclosure > summary::after {
  color: var(--ink-muted);
  content: "+";
  font-size: 20px;
  line-height: 1;
}

.disclosure[open] > summary {
  border-bottom: 1px solid var(--line);
}

.disclosure[open] > summary::after {
  content: "−";
}

.disclosure__body {
  padding: 20px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 0 18px;
  color: var(--ink-muted);
  font-size: 13px;
}

.breadcrumb a {
  color: var(--ink-soft);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--brand-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.meta-chip {
  border-radius: 999px;
  background: #eef1f5;
  color: var(--ink-soft);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 650;
}

.snippet-list {
  display: grid;
  gap: 10px;
}

.snippet {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.snippet__body {
  padding: 16px 18px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.snippet__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-subtle);
  padding: 9px 12px 9px 18px;
}

.snippet__date {
  color: var(--ink-muted);
  font-size: 12px;
}

.snippet--editing .snippet__body {
  padding: 0;
}

.snippet--editing .textarea {
  min-height: 120px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.snippet-edit-actions {
  padding: 0 16px 14px;
}

.snippet__body > p {
  margin: 0;
}

.snippet__body > p + p {
  margin-top: 8px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.search-results {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.search-result {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  padding: 12px 14px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.search-result--empty {
  padding: 22px;
  color: var(--ink-muted);
  font-size: 13px;
  text-align: center;
}

/*
 * White page surface for the client workspace, matching the pages that still
 * carry their own styles: white background, system font stack, and a compact
 * centred column, so the chrome reads the same on every admin page.
 */
body.surface-page {
  --brand: #1f2937;
  --brand-strong: #111827;
  --brand-soft: #f3f4f6;
  --shadow-sm: none;
  background: var(--surface);
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
}

body.surface-page .page-title {
  font-size: 24px;
  letter-spacing: -0.02em;
}

body.surface-page .eyebrow {
  color: var(--ink-muted);
}

/* Optional: keeps the rubber-band overscroll area white on the same page. */
html:has(body.surface-page) {
  background: var(--surface);
}

body.surface-page .admin-main {
  width: min(calc(100% - 64px), 960px);
  padding: 24px 0 48px;
}

/*
 * Client workspace: one white page whose sections sit behind tabs, so a long
 * snippet list never pushes the other settings out of reach.
 */
.client-workspace .input,
.client-workspace .select,
.client-workspace .textarea {
  font-size: 16px;
}

.client-workspace .input,
.client-workspace .select,
.client-workspace .textarea,
.client-workspace .btn {
  min-height: 44px;
}

.client-tabs {
  margin: 0 0 24px;
  border-bottom: 1px solid var(--line);
}

.client-tabs__list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  scrollbar-width: thin;
}

.client-tabs__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  box-shadow: inset 0 -2px 0 transparent;
  color: var(--ink-soft);
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 140ms ease, box-shadow 140ms ease;
}

.client-tabs__link:hover {
  box-shadow: inset 0 -2px 0 var(--line-strong);
  color: var(--ink);
}

.client-tabs__link[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--ink);
  color: var(--ink);
}

.snippet__details {
  margin: 0;
  border: 0;
}

.snippet__summary {
  cursor: pointer;
  padding: 16px 18px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  list-style: none;
}

.snippet__summary::-webkit-details-marker {
  display: none;
}

.snippet__details[open] .snippet__summary {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.snippet__preview {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
}

.snippet__details[open] .snippet__preview {
  display: none;
}

.snippet__toggle {
  display: inline-block;
  margin-top: 8px;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 700;
}

.snippet__details[open] .snippet__toggle--more,
.snippet__toggle--less {
  display: none;
}

.snippet__details[open] .snippet__toggle--less {
  display: inline-block;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.pager__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.pager__link:hover {
  border-color: #aeb9c6;
  background: var(--surface-subtle);
}

.pager__link--disabled {
  border-color: var(--line);
  color: var(--ink-muted);
}

.pager__status {
  color: var(--ink-muted);
  font-size: 13px;
}

.search-count {
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
}

.search-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.oauth-list {
  display: grid;
  gap: 10px;
  min-inline-size: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.oauth-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 15px 18px;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.oauth-card:hover {
  border-color: #9eacbe;
}

.oauth-card:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent);
}

.oauth-card--selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.oauth-card__control {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}

.oauth-card--selected .oauth-card__control {
  border-color: var(--brand);
  background: var(--brand);
  color: white;
}

.oauth-card--selected .oauth-card__control::after {
  width: 5px;
  height: 9px;
  margin-top: -2px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  content: "";
  transform: rotate(45deg);
}

.oauth-card__name {
  font-size: 15px;
  font-weight: 740;
}

.oauth-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 12px;
}

.oauth-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgb(255 255 255 / 0.96);
  padding: 15px 18px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
  background: var(--surface);
}

.auth-main {
  display: grid;
  place-items: center;
  padding: 42px;
}

.auth-card {
  width: 100%;
  max-width: 380px;
}

.auth-brand {
  margin-bottom: 38px;
}

.auth-brand .brand__wordmark {
  display: inline;
}

.auth-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.auth-subtitle {
  margin: 9px 0 26px;
  color: var(--ink-soft);
  font-size: 14px;
}

.auth-card > .alert {
  margin-bottom: 18px;
}

.auth-aside {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: flex-end;
  background:
    radial-gradient(circle at 85% 15%, rgb(114 145 255 / 0.42), transparent 34%),
    linear-gradient(145deg, #182445 0%, #233f9b 54%, #3158d4 100%);
  color: white;
  padding: clamp(44px, 7vw, 92px);
}

.auth-aside__content {
  max-width: 560px;
}

.auth-aside__eyebrow {
  margin: 0 0 12px;
  color: #cbd7ff;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.auth-aside__title {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.auth-aside__copy {
  max-width: 520px;
  margin: 18px 0 0;
  color: #dce4ff;
  font-size: 16px;
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

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

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-main {
    min-height: 100vh;
  }

  .auth-aside {
    display: none;
  }
}

@media (max-width: 720px) {
  .admin-main {
    width: min(calc(100% - 28px), var(--content));
  }

  body.surface-page .admin-main {
    width: min(calc(100% - 28px), 960px);
    padding: 18px 0 40px;
  }

  .admin-main {
    padding: 30px 0 48px;
  }

  .page-header {
    flex-direction: column;
    margin-bottom: 22px;
  }

  .page-header__actions {
    width: 100%;
  }

  .page-header__actions .btn {
    flex: 1;
  }

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

  .form-grid__wide {
    grid-column: auto;
  }

  .data-table--responsive thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .data-table--responsive,
  .data-table--responsive tbody,
  .data-table--responsive tr,
  .data-table--responsive td {
    display: block;
    width: 100%;
  }

  .data-table--responsive tbody {
    display: grid;
    gap: 12px;
    padding: 12px;
  }

  .data-table--responsive tr {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
  }

  .data-table--responsive td {
    display: grid;
    grid-template-columns: minmax(90px, 0.42fr) minmax(0, 1fr);
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding: 11px 14px;
    text-align: left !important;
  }

  .data-table--responsive td::before {
    color: var(--ink-muted);
    content: attr(data-label);
    font-size: 11px;
    font-weight: 760;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .data-table--responsive td:last-child {
    border-bottom: 0;
  }

  .oauth-card {
    grid-template-columns: auto 1fr;
  }

  .oauth-card > .status {
    grid-column: 2;
    width: fit-content;
  }

  .oauth-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .oauth-footer .button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .auth-main {
    padding: 28px 22px;
  }
}

@media (max-width: 520px) {
  .brand__wordmark {
    display: none;
  }

  .stats-grid,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 0;
  }

  .panel__header,
  .panel__body,
  .disclosure__body {
    padding: 17px;
  }

  .snippet__footer,
  .search-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .snippet__footer {
    display: flex;
    flex-direction: column;
  }

  .snippet__footer .button-row {
    width: 100%;
  }

  .snippet__footer .btn {
    flex: 1;
  }
}
