:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1d252c;
  background: #f5f7f8;
  font-synthesis: none;
  --control-shadow: 0 1px 2px rgba(32, 42, 49, .08), 0 10px 24px rgba(32, 42, 49, .06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: #f5f7f8;
}

button, input, select, textarea { font: inherit; }
form { margin: 0; }
a { color: inherit; }

.skip-link {
  position: fixed;
  inset-block-start: 8px;
  inset-inline-start: 16px;
  z-index: 30;
  padding: 8px 12px;
  border-radius: 6px;
  color: #fff;
  background: #202a31;
  box-shadow: var(--control-shadow);
  transform: translateY(-180%);
  transition-property: transform;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
.skip-link:focus-visible { transform: translateY(0); }

button {
  min-height: 38px;
  border: 1px solid #176b58;
  border-radius: 6px;
  padding: 7px 12px;
  color: #fff;
  background: #176b58;
  cursor: pointer;
  font-weight: 650;
  box-shadow: 0 1px 1px rgba(22, 45, 39, .12);
  transition-property: background-color, border-color, color, box-shadow, transform;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

button:hover { background: #115846; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #202a31;
}
button:disabled { cursor: not-allowed; opacity: .58; }

.button--secondary { color: #25313a; background: #fff; border-color: #aeb9c1; }
.button--secondary:hover, .button--quiet:hover { background: #edf2f4; }
.button--danger { background: #a43b3b; border-color: #a43b3b; }
.button--danger:hover { background: #842f2f; }
.button--quiet { min-height: 40px; color: #25313a; background: transparent; border-color: #aeb9c1; }
.button--danger-text { color: #8a2929; border-color: #c88c8c; }
.button--danger-text:hover { color: #fff; background: #a43b3b; border-color: #a43b3b; }
.button--topbar {
  min-height: 40px;
  color: #f4f7f8;
  background: transparent;
  border-color: #60727f;
  font-size: 12px;
}
.button--topbar:hover { background: #34424b; }

.topbar { color: #fff; background: #202a31; border-bottom: 3px solid #e0a126; }
.topbar__inner {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 18px clamp(16px, 3vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.topbar__actions { display: flex; align-items: center; gap: 12px; }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 22px; line-height: 1.2; letter-spacing: 0; }
h2 { margin-bottom: 0; font-size: 18px; line-height: 1.3; letter-spacing: 0; }
h3 { margin-bottom: 14px; font-size: 15px; line-height: 1.3; letter-spacing: 0; }

.eyebrow {
  margin-bottom: 4px;
  color: #60727f;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar .eyebrow { color: #bfcbd2; }
.environment, .scope {
  color: #dce4e8;
  font-size: 12px;
  white-space: nowrap;
}

.scope { color: #4f626e; }
.dashboard { min-height: calc(100vh - 84px); }
.dashboard__inner {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 40px) 64px;
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  align-items: start;
  gap: 40px;
}
.dashboard__content { min-width: 0; }
.root-scope {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 24px;
  padding: 12px 14px;
  border: 1px solid #d4dde2;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--control-shadow);
}
.root-scope label { flex: 0 0 auto; margin: 0; color: #4f626e; font-size: .875rem; font-weight: 700; }
.root-scope input { flex: 1 1 280px; min-width: min(280px, 100%); margin-top: 0; }
.loading { width: min(1440px, 100%); margin: 0 auto; padding: 36px clamp(16px, 3vw, 40px); color: #53636e; }

.dashboard-nav {
  position: sticky;
  top: 20px;
  min-width: 0;
  padding-block: 8px;
  padding-inline-end: 18px;
  border-inline-end: 1px solid #cbd5da;
}

.dashboard-nav__group + .dashboard-nav__group { margin-top: 28px; }
.dashboard-nav__label {
  margin-bottom: 6px;
  color: #687984;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dashboard-nav a {
  min-height: 38px;
  margin-inline-start: -1px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  border-inline-start: 3px solid transparent;
  color: #344650;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.dashboard-nav a:hover { border-inline-start-color: #e0a126; background: #e9eef1; }
.dashboard-nav a[aria-current="page"] {
  border-inline-start-color: #e0a126;
  color: #172127;
  background: #e2e9ec;
}
.dashboard-nav a:focus-visible { outline: 3px solid #202a31; outline-offset: -2px; }

.summary, .dataset { padding: 28px 0; }
.summary, .dataset { scroll-margin-top: 18px; }
.summary + .dataset, .dataset + .dataset { margin-top: 8px; }
.section-heading {
  min-height: 40px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.metrics {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #d4dde2;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--control-shadow);
  overflow: hidden;
}

.metrics div { min-width: 0; padding: 16px; border-inline-end: 1px solid #e0e6e9; }
.metrics div:last-child { border-inline-end: 0; }
.metrics dt { color: #60727f; font-size: 12px; }
.metrics dd {
  margin: 5px 0 0;
  font-size: 24px;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

label { display: block; margin-bottom: 10px; color: #475963; font-size: 12px; font-weight: 650; }
input, select, textarea {
  width: 100%;
  min-height: 36px;
  margin-top: 5px;
  border: 1px solid #aeb9c1;
  border-radius: 6px;
  padding: 7px 9px;
  color: #182127;
  background: #fff;
  font-size: 1rem;
  transition-property: border-color, box-shadow;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.dataset-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.dataset-footer { min-height: 36px; margin-top: 12px; display: flex; justify-content: flex-end; }
.actions-column { width: 1%; min-width: 168px; white-space: nowrap; }
.table-actions { min-width: 168px; white-space: nowrap; }
.table-actions > button + button { margin-inline-start: 6px; }
.muted { color: #687984; font-size: 12px; }

.control-popover {
  width: min(480px, calc(100vw - 32px));
  max-height: min(82vh, 760px);
  margin: auto;
  border: 1px solid #aeb9c1;
  border-top: 4px solid #e0a126;
  border-radius: 10px;
  padding: 24px;
  color: #1d252c;
  background: #fff;
  box-shadow: 0 2px 4px rgba(32, 42, 49, .08), 0 18px 48px rgba(32, 42, 49, .2);
  overscroll-behavior: contain;
  overflow: auto;
}
.control-popover--wide { width: min(780px, calc(100vw - 32px)); }
.control-popover--danger { border-top-color: #a43b3b; }
.control-popover::backdrop { background: rgba(22, 29, 34, .38); }
.popover-heading { margin-bottom: 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.popover-heading h3 { margin-bottom: 0; }
.button--close {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  color: #344650;
  background: transparent;
  border-color: #aeb9c1;
  font-weight: 750;
  font-size: 0;
}
.button--close::before { content: "\00d7"; font-size: 20px; line-height: 1; }
.button--close:hover { color: #fff; background: #344650; }
.command, .query-panel { min-width: 0; display: grid; gap: 12px; }
.command-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.command-grid .command + .command { padding-inline-start: 24px; border-inline-start: 1px solid #d7dfe3; }
.command h4 { margin: 0 0 2px; font-size: 13px; }
.command label, .query-panel label { margin: 0; }
.command small { display: block; margin-top: 6px; color: #687984; font-size: 11px; line-height: 1.4; }
.command--compact > button, .query-panel > button { justify-self: start; }
.task-hint {
  margin: -6px 0 16px;
  color: #526671;
  font-size: 13px;
  line-height: 1.55;
}
.access-task { min-width: 0; display: grid; align-content: start; gap: 10px; }
.access-task > h4 { margin: 0; font-size: 14px; }
.task-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.task-actions .command { display: block; }
.tree-node {
  display: inline-block;
  color: #263740;
  font-family: "Cascadia Code", Consolas, monospace;
  font-weight: 650;
  white-space: pre;
}
.group-tree { display: grid; gap: 8px; }
.group-tree__node { position: relative; border: 1px solid #d4dde2; border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgba(32, 42, 49, .04); }
.group-tree__branch {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 9px;
  padding-inline-start: 24px;
}
.group-tree__branch::before {
  content: "";
  position: absolute;
  inset-inline-start: 7px;
  width: 8px;
  height: 8px;
  border: 2px solid #70808a;
  background: #fff;
}
.group-tree__identity { min-width: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.group-tree__identity strong { overflow-wrap: anywhere; }
.group-tree__identity small { flex-basis: 100%; color: #687984; }
.group-tree__status { color: #49616d; font-size: 12px; }
.group-tree__actions { flex: 0 0 auto; display: flex; gap: 6px; align-items: center; }
.group-tree__node--depth-1 { margin-inline-start: 24px; }
.group-tree__node--depth-2 { margin-inline-start: 48px; }
.group-tree__node--depth-3 { margin-inline-start: 72px; }
.group-tree__node--depth-4 { margin-inline-start: 96px; }
.group-tree__node--depth-5 { margin-inline-start: 120px; }
.group-tree__node--depth-6 { margin-inline-start: 144px; }
.group-tree__node--depth-7 { margin-inline-start: 168px; }
.group-tree__node--depth-8 { margin-inline-start: 192px; }
.group-tree__node--depth-9 { margin-inline-start: 216px; }
.group-tree__node--depth-10 { margin-inline-start: 240px; }
.group-tree__node--depth-11 { margin-inline-start: 264px; }
.group-tree__node--depth-12 { margin-inline-start: 288px; }
.group-tree__node--depth-13 { margin-inline-start: 312px; }
.group-tree__node--depth-14 { margin-inline-start: 336px; }
.group-tree__node--depth-15 { margin-inline-start: 360px; }
.entity-picker {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(180px, .65fr);
  gap: 14px;
}
.entity-picker__pane {
  min-width: 0;
  border: 1px solid #d4dde2;
  border-radius: 8px;
  background: #f8fafb;
  overflow: hidden;
}
.entity-picker__pane h4 {
  margin: 0;
  padding: 9px 11px;
  border-bottom: 1px solid #d4dde2;
  color: #50616c;
  background: #edf2f4;
  font-size: 11px;
  text-transform: uppercase;
}
.entity-picker__list {
  max-height: 260px;
  padding: 6px;
  display: grid;
  gap: 3px;
  overflow: auto;
}
.entity-picker__option {
  width: 100%;
  min-height: 40px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-color: transparent;
  color: #263740;
  background: transparent;
  box-shadow: none;
  text-align: start;
}
.entity-picker__option:hover { color: #263740; background: #e6edef; }
.entity-picker__option[aria-selected="true"] {
  color: #fff;
  background: #176b58;
}
.entity-picker__option small { color: #6b7b85; font-size: 11px; }
.entity-picker__option[aria-selected="true"] small { color: #d8eee8; }
.entity-picker__option--tree span {
  font-family: "Cascadia Code", Consolas, monospace;
  white-space: pre;
}
.entity-picker__pane--target { padding-bottom: 12px; }
.entity-picker__target-name {
  margin: 12px 12px 8px;
  font-weight: 720;
  overflow-wrap: anywhere;
}
.entity-picker__selection {
  min-height: 44px;
  margin: 0 12px;
  padding: 10px;
  display: block;
  border: 1px solid #bad0ca;
  border-radius: 8px;
  color: #164f42;
  background: #eaf5f2;
  overflow-wrap: anywhere;
}
.entity-picker__selection--empty {
  border-color: #d7dfe3;
  color: #687984;
  background: #fff;
}
.entity-picker__commands { margin-top: 16px; }
.notice-inline {
  margin: 10px 0 0;
  color: #76531c;
  font-size: 12px;
}
.acl-rule-table { min-width: 860px; }
.acl-rule-row {
  transition-property: background-color;
  transition-duration: 100ms;
  transition-timing-function: ease-out;
}
.acl-rule-row > td { vertical-align: middle; }
.acl-rule__ordinal { font-variant-numeric: tabular-nums; }
.acl-rule__ordinal,
.acl-rule__decision,
.acl-rule__subject,
.acl-rule__subject code { white-space: nowrap; }
.acl-builder { display: grid; gap: 14px; }
.acl-builder__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.acl-builder__entries {
  grid-column: 1 / -1;
}
.acl-builder__entries textarea { min-height: 160px; resize: vertical; font-family: "Cascadia Code", Consolas, monospace; line-height: 1.5; }
.acl-builder__entries small { display: block; margin-top: 5px; color: #60727f; font-weight: 500; line-height: 1.45; }
.acl-preview {
  padding: 10px 12px;
  border-inline-start: 3px solid #176b58;
  background: #eaf5f2;
  display: grid;
  gap: 4px;
}
.acl-preview span {
  color: #526671;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}
.acl-preview output { color: #244039; overflow-wrap: anywhere; white-space: pre-wrap; font-family: "Cascadia Code", Consolas, monospace; }
.acl-document { margin-top: 7px; }
.acl-document summary { color: #176b58; cursor: pointer; font-weight: 650; }
.acl-document pre { max-width: 560px; margin: 8px 0 0; padding: 10px; overflow: auto; border: 1px solid #d4dde2; border-radius: 4px; background: #f8fafb; font: 12px/1.5 "Cascadia Code", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid #d4dde2; border-radius: 8px; background: #fff; box-shadow: var(--control-shadow); }
table { width: 100%; border-collapse: collapse; table-layout: auto; }
th, td { padding: 10px 12px; border-bottom: 1px solid #e2e8eb; text-align: start; vertical-align: top; font-size: 13px; }
th { color: #50616c; background: #edf2f4; font-size: 11px; text-transform: uppercase; letter-spacing: 0; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f7fafb; }
td { overflow-wrap: anywhere; }
code { color: #713d1a; font-family: "Cascadia Code", Consolas, monospace; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty { padding: 28px 16px; color: #6b7b85; text-align: center; }
.pager {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.pager__status { color: #60727f; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pager button { min-width: 88px; }
.feedback:empty { display: none; }
.feedback { margin-bottom: 14px; }
.notice { display: flex; gap: 10px; padding: 11px 13px; border-inline-start: 4px solid #a43b3b; color: #632323; background: #faeaea; }
.credential-secret {
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid #8cb8ab;
  border-inline-start: 4px solid #176b58;
  border-radius: 8px;
  background: #f1f8f5;
  box-shadow: 0 1px 2px rgba(32, 42, 49, .06);
}
.credential-secret:focus { outline: 3px solid #202a31; outline-offset: 3px; }
.credential-secret__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.credential-secret__heading h2 { font-size: 17px; }
.credential-secret__identity {
  margin: 16px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
}
.credential-secret__identity div { min-width: 0; }
.credential-secret__identity dt { color: #60727f; font-size: 11px; font-weight: 700; }
.credential-secret__identity dd { margin: 4px 0 0; font-weight: 650; overflow-wrap: anywhere; }
.credential-secret__value { display: flex; align-items: stretch; gap: 10px; }
.credential-secret__value code {
  min-width: 0;
  flex: 1 1 auto;
  padding: 10px 12px;
  border: 1px solid #aeb9c1;
  border-radius: 6px;
  color: #172127;
  background: #fff;
  font-family: "Cascadia Code", Consolas, monospace;
  line-height: 1.5;
  overflow-wrap: anywhere;
  user-select: all;
}
.credential-secret__value code:focus-visible { outline: 3px solid #202a31; outline-offset: 2px; }
.credential-secret__status { min-height: 20px; margin-top: 8px; display: block; color: #315f53; font-size: 12px; }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline-block; }
.htmx-request { cursor: wait; }

.auth-page {
  min-height: 100vh;
  min-height: 100svh;
  color: #1d252c;
  background: #e9eef1;
}

.auth-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  padding: 32px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-panel {
  width: 100%;
  max-width: 460px;
  min-width: 0;
  border: 1px solid #cbd5da;
  border-top: 4px solid #e0a126;
  border-radius: 10px;
  padding: 32px;
  background: #fff;
  box-shadow: var(--control-shadow);
}

.auth-brand { margin-bottom: 24px; }
.auth-brand h1 { font-size: 26px; }

.scope-switch {
  width: 100%;
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #aeb9c1;
  border-radius: 8px;
  overflow: hidden;
}

.scope-switch a {
  min-width: 0;
  min-height: 42px;
  padding: 10px 12px;
  display: grid;
  place-items: center;
  color: #465862;
  background: #f5f7f8;
  font-size: 13px;
  font-weight: 680;
  text-align: center;
  text-decoration: none;
}

.scope-switch a + a { border-inline-start: 1px solid #aeb9c1; }
.scope-switch a:hover { background: #edf2f4; }
.scope-switch a[aria-current="page"] { color: #fff; background: #202a31; }
.scope-switch a:focus-visible { outline: 3px solid #202a31; outline-offset: -3px; }
.scope-switch a[aria-current="page"]:focus-visible { outline-color: #fff; }

.auth-form { display: grid; gap: 16px; }
.auth-form label { margin: 0; font-size: 13px; }
.auth-form input { min-height: 44px; }
.auth-form button { min-height: 44px; margin-top: 2px; }

.scope-field {
  min-height: 44px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d5dde1;
  border-radius: 4px;
  color: #50616c;
  background: #f5f7f8;
  font-size: 13px;
}

.scope-field strong { color: #202a31; }
.auth-error {
  margin-bottom: 18px;
  padding: 10px 12px;
  border-inline-start: 4px solid #a43b3b;
  color: #632323;
  background: #faeaea;
  font-size: 13px;
}

@media (max-width: 1050px) {
  .dashboard__inner { grid-template-columns: 176px minmax(0, 1fr); gap: 28px; }
}

@media (max-width: 860px) {
  .dashboard__inner { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 0; }
  .dashboard-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    margin-inline: calc(clamp(16px, 3vw, 40px) * -1);
    padding: 8px clamp(16px, 3vw, 40px);
    display: flex;
    gap: 4px;
    overflow-x: auto;
    border-inline-end: 0;
    border-bottom: 1px solid #cbd5da;
    background: #f5f7f8;
    scrollbar-width: thin;
  }
  .dashboard-nav__group { display: contents; }
  .dashboard-nav__group + .dashboard-nav__group { margin-top: 0; }
  .dashboard-nav__label { display: none; }
  .dashboard-nav a {
    min-height: 40px;
    flex: 0 0 auto;
    border-inline-start: 0;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
  }
  .dashboard-nav a:hover { border-inline-start-color: transparent; border-bottom-color: #e0a126; }
  .dashboard-nav a[aria-current="page"] {
    border-inline-start-color: transparent;
    border-bottom-color: #e0a126;
  }
  .summary, .dataset { scroll-margin-top: 58px; }
}

@media (max-width: 720px) {
  .topbar__inner, .section-heading { align-items: flex-start; flex-direction: column; }
  .topbar__actions { width: 100%; justify-content: space-between; }
  .environment, .scope { white-space: normal; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics div:nth-child(2), .metrics div:last-child { border-inline-end: 0; }
  .metrics div:nth-child(-n+2) { border-bottom: 1px solid #e0e6e9; }
  .dataset-toolbar { width: 100%; justify-content: flex-start; }
  .root-scope { align-items: stretch; flex-direction: column; gap: 7px; }
  .root-scope input { min-width: 0; flex: 0 0 auto; }
  .command-grid { grid-template-columns: 1fr; }
  .command-grid .command + .command { padding-top: 16px; padding-inline-start: 0; border-top: 1px solid #d7dfe3; border-inline-start: 0; }
  .entity-picker { grid-template-columns: 1fr; }
  .group-tree__branch { align-items: flex-start; flex-direction: column; gap: 8px; }
  .group-tree__actions { width: 100%; flex-wrap: wrap; }
  .group-tree__node--depth-1 { margin-inline-start: 12px; }
  .group-tree__node--depth-2 { margin-inline-start: 24px; }
  .group-tree__node--depth-3 { margin-inline-start: 36px; }
  .group-tree__node--depth-4 { margin-inline-start: 48px; }
  .group-tree__node--depth-5 { margin-inline-start: 60px; }
  .group-tree__node--depth-6 { margin-inline-start: 72px; }
  .group-tree__node--depth-7 { margin-inline-start: 84px; }
  .group-tree__node--depth-8 { margin-inline-start: 96px; }
  .group-tree__node--depth-9 { margin-inline-start: 108px; }
  .group-tree__node--depth-10 { margin-inline-start: 120px; }
  .group-tree__node--depth-11 { margin-inline-start: 132px; }
  .group-tree__node--depth-12 { margin-inline-start: 144px; }
  .group-tree__node--depth-13 { margin-inline-start: 156px; }
  .group-tree__node--depth-14 { margin-inline-start: 168px; }
  .group-tree__node--depth-15 { margin-inline-start: 180px; }
  .acl-builder__grid { grid-template-columns: 1fr; }
  .acl-builder__entries { grid-column: auto; }
  .pager { width: 100%; justify-content: flex-start; }
  .pager__status { width: 100%; }
  .pager button { flex: 1; }
  .table-wrap { margin-inline: 0; }
  .credential-secret__heading, .credential-secret__value { align-items: stretch; flex-direction: column; }
  .credential-secret__heading button, .credential-secret__value button { align-self: flex-start; }
  .credential-secret__identity { grid-template-columns: minmax(0, 1fr); }
  #users th:first-child, #users td:first-child { min-width: 140px; }
  table { min-width: 620px; }
  .auth-shell { padding: 20px 14px; }
  .auth-panel { padding: 24px 20px; }
}

@media (max-width: 480px) {
  .metrics { grid-template-columns: 1fr; }
  .metrics div { border-inline-end: 0; border-bottom: 1px solid #e0e6e9; }
  .metrics div:last-child { border-bottom: 0; }
  .scope-switch { grid-template-columns: 1fr; }
  .scope-switch a + a { border-inline-start: 0; border-top: 1px solid #aeb9c1; }
}

@media (forced-colors: active) {
  button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
  .dashboard-nav a:focus-visible, .scope-switch a:focus-visible {
    outline: 3px solid Highlight;
    outline-offset: 2px;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media (prefers-reduced-motion: no-preference) {
  button:not(:disabled):not(.entity-picker__option):active { transform: scale(.96); }
}
