:root {
  color-scheme: light;
  --bg: #f5f7f9;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #d8dee8;
  --accent: #1473e6;
  --accent-quiet: #e7f0ff;
  --success: #067647;
  --success-quiet: #ecfdf3;
  --warning: #a15c07;
  --warning-quiet: #fff8e6;
  --danger: #b42318;
  --danger-quiet: #fffbfa;
  --code: #101828;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--text);
  color: #ffffff;
  transform: translateY(-160%);
}

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

.shell {
  width: min(760px, 100%);
  padding: 24px;
}

.admin-shell {
  width: min(1440px, 100%);
  padding: 24px;
}

.panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

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

h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

p {
  margin: 6px 0 0;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e7f0ff;
  color: #164c96;
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef2f6;
  color: #344054;
  font-size: 13px;
}

.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--muted);
}

.notice.danger {
  color: var(--danger);
  border-color: #fecdca;
  background: var(--danger-quiet);
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

input,
select,
textarea,
button {
  min-height: 44px;
  border-radius: 8px;
  font: inherit;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  padding: 0 12px;
  color: var(--text);
  background: #ffffff;
  min-width: 0;
}

textarea {
  padding-top: 10px;
  resize: vertical;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(20 115 230 / 24%);
  outline-offset: 2px;
}

button {
  border: 0;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

pre {
  margin: 18px 0 0;
  padding: 14px;
  border-radius: 8px;
  background: var(--code);
  color: #d1fadf;
  overflow: auto;
}

.admin-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.admin-topbar h1 {
  font-size: 26px;
}

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

.notification-shell {
  display: inline-flex;
}

.notification-trigger {
  position: relative;
  display: inline-grid;
  width: 42px;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 18px;
}

.notification-trigger:hover {
  border-color: #98a2b3;
  background: #f8fafc;
}

.notification-count {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border: 2px solid var(--panel);
  border-radius: 10px;
  background: var(--danger);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.notification-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 32px));
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
}

.notification-dialog::backdrop {
  background: rgb(16 24 40 / 44%);
}

.notification-toolbar {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.notification-toolbar p {
  margin: 0;
  font-size: 13px;
}

.text-button {
  min-height: 36px;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
}

.notification-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.notification-item {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 14px 10px 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.notification-item:hover {
  background: #f8fafc;
}

.notification-item-unread::before {
  position: absolute;
  top: 20px;
  left: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.notification-item strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.notification-item span,
.notification-item time {
  color: var(--muted);
  font-size: 12px;
}

.identity-chip {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.identity-chip strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-chip small {
  color: var(--muted);
  font-size: 11px;
}

.identity-chip:hover strong {
  color: var(--accent);
}

.text-link {
  color: var(--accent);
  font-size: 14px;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.platform-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.platform-status p {
  margin: 0;
  font-size: 13px;
}

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.admin-tabs button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.admin-tabs button[aria-selected="true"] {
  background: var(--accent-quiet);
  color: #164c96;
}

#admin-view:focus {
  outline: none;
}

.metric {
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  line-height: 1;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.platform-grid {
  display: grid;
  gap: 12px;
}

.platform-table td > small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

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

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.section-heading p {
  font-size: 13px;
}

.section-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.tenant-settings-panel .section-heading > div {
  min-width: 0;
}

.entitlement-panel .section-heading > div {
  min-width: 0;
}

.entitlement-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
}

.entitlement-grid > div {
  min-width: 0;
  padding: 0 18px;
  border-left: 1px solid var(--line);
}

.entitlement-grid > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.entitlement-grid > div:last-child {
  padding-right: 0;
}

.entitlement-grid dt {
  color: var(--muted);
  font-size: 13px;
}

.entitlement-grid dd {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 8px 0;
}

.entitlement-grid dd strong {
  font-size: 24px;
  line-height: 1;
}

.entitlement-grid dd span,
.entitlement-grid small {
  color: var(--muted);
  font-size: 12px;
}

.entitlement-grid meter {
  display: block;
  width: 100%;
  height: 8px;
  margin-bottom: 7px;
  accent-color: var(--accent);
}

.entitlement-grid .quota-limit {
  color: var(--danger);
  font-weight: 600;
}

.worker-status-panel .section-heading > div {
  min-width: 0;
}

.worker-alerts {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.worker-alert {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
}

.worker-alert-warning {
  border-color: #fedf89;
  background: var(--warning-quiet);
  color: var(--warning);
}

.worker-alert-critical {
  border-color: #fecdca;
  background: var(--danger-quiet);
  color: var(--danger);
}

.worker-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.worker-status-grid > div {
  min-width: 0;
  padding: 12px;
  background: var(--panel);
}

.worker-status-grid dt {
  color: var(--muted);
  font-size: 12px;
}

.worker-status-grid dd {
  margin: 6px 0 0;
  font-size: 22px;
  font-weight: 700;
}

.worker-dead-letter-heading {
  margin-top: 20px;
}

.worker-dead-letter-heading h3 {
  margin: 0;
  font-size: 16px;
}

.worker-requeue-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 290px;
}

.worker-requeue-form select,
.worker-requeue-form button {
  min-height: 34px;
}

.list-toolbar {
  display: grid;
  grid-template-columns:
    minmax(220px, 1fr)
    minmax(170px, 230px)
    minmax(180px, 230px)
    minmax(160px, 200px)
    auto
    auto;
  align-items: end;
  gap: 8px;
  margin-bottom: 10px;
}

.list-toolbar button {
  padding: 0 16px;
}

.audit-toolbar {
  grid-template-columns:
    minmax(220px, 1fr)
    minmax(180px, 230px)
    minmax(160px, 200px)
    auto
    auto;
}

.saved-views-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.saved-view-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.saved-view-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.saved-view-item {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.saved-view-item a {
  min-height: 34px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
}

.saved-view-item a:hover {
  color: var(--accent);
}

.icon-button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
}

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

.filter-reset {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  color: var(--accent);
  font-size: 14px;
  text-decoration: none;
}

.filter-reset:hover {
  text-decoration: underline;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.pagination div {
  display: flex;
  gap: 6px;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.pagination a:hover {
  border-color: #b2ccff;
  background: var(--accent-quiet);
}

.inline-form,
.access-form,
.member-form,
.approver-form {
  display: grid;
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
}

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

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

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

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

.subsection-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 14px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.subsection-heading h3,
.subsection-heading p {
  margin: 0;
}

.subsection-heading p {
  margin-top: 4px;
  color: var(--muted);
}

.check-row {
  min-height: 42px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.check-row input {
  min-height: auto;
  width: 16px;
  height: 16px;
}

.capability-fieldset {
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.capability-fieldset legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.capability-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.capability-options .check-row {
  min-height: 28px;
  font-size: 13px;
}

.access-form .capability-fieldset {
  grid-column: span 3;
}

.catalog-capabilities {
  grid-column: 1 / -1;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  background: #ffffff;
}

.compact-table table {
  min-width: 900px;
}

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

th {
  background: #f8fafc;
  color: #475467;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

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

td code {
  display: inline-block;
  max-width: 520px;
  overflow: hidden;
  color: #344054;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-name,
.person-username {
  display: block;
}

.person-name {
  font-weight: 600;
}

.person-username {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.empty {
  color: var(--muted);
  text-align: center;
}

.state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.state-ok {
  background: var(--success-quiet);
  color: var(--success);
}

.state-muted {
  background: #eef2f6;
  color: #475467;
}

.state-warning {
  background: var(--warning-quiet);
  color: var(--warning);
}

.state-danger {
  background: var(--danger-quiet);
  color: var(--danger);
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.small-button {
  min-height: 32px;
  padding: 0 10px;
  white-space: nowrap;
}

.secondary-button {
  background: #eef2f6;
  color: #344054;
}

.danger-button {
  background: var(--danger-quiet);
  color: var(--danger);
  border: 1px solid #fecdca;
}

.muted-text {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.membership-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 0.7fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 480px;
}

.membership-actions {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px;
}

.owner-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 16px 0 20px;
  border-bottom: 1px solid var(--line);
}

.owner-summary div {
  min-width: 0;
}

.owner-summary dt {
  color: var(--muted);
  font-size: 12px;
}

.owner-summary dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-weight: 650;
}

.administrator-permissions {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.administrator-permissions fieldset {
  min-width: 0;
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

.administrator-permissions legend {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
}

.permission-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 14px;
}

.permission-check-grid label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.permission-check-grid input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
}

.permission-project {
  display: grid;
  grid-template-columns: minmax(150px, 0.55fr) minmax(0, 2fr);
  gap: 18px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.permission-project:first-child {
  border-top: 0;
}

.permission-project > strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

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

.permission-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.ownership-transfer {
  margin-top: 20px;
}

.ownership-transfer summary {
  width: fit-content;
  cursor: pointer;
  color: var(--danger);
  font-weight: 700;
}

.ownership-transfer .inline-form {
  margin-top: 14px;
}

.security-shell {
  width: min(1120px, 100%);
  padding: 24px;
}

.security-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.security-topbar h1 {
  margin-top: 6px;
}

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

.security-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.security-facts div {
  min-width: 0;
}

.security-facts dt {
  color: var(--muted);
  font-size: 12px;
}

.security-facts dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 600;
}

.security-status > button {
  width: 100%;
}

.ssh-key-form {
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1.55fr) auto;
  align-items: end;
  margin-bottom: 16px;
}

.ssh-key-mode,
.ssh-key-generator {
  grid-column: 1 / -1;
}

.ssh-key-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(420px, 100%);
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2f6;
}

.ssh-key-mode button {
  min-height: 38px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
}

.ssh-key-mode button[aria-pressed="true"] {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 2px rgb(16 24 40 / 8%);
}

.ssh-key-generator {
  display: grid;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.ssh-key-generator-fields,
.ssh-key-preview,
.ssh-key-command-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ssh-key-generator-fields select {
  width: 100%;
}

.ssh-key-preview {
  margin: 0;
}

.ssh-key-preview div {
  min-width: 0;
}

.ssh-key-preview div:first-child {
  grid-column: span 2;
}

.ssh-key-preview dt {
  color: var(--muted);
  font-size: 12px;
}

.ssh-key-preview dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 600;
}

.ssh-key-preview code {
  color: var(--code);
  font-size: 12px;
}

.ssh-key-command-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
}

.ssh-key-command {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.ssh-key-command + .ssh-key-command {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.ssh-key-command textarea {
  min-height: 76px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.ssh-key-command button {
  justify-self: start;
}

.ssh-key-safety {
  margin: 0;
  color: var(--success);
  font-size: 13px;
  font-weight: 600;
}

.ssh-key-submit {
  display: grid;
  align-content: end;
  gap: 8px;
}

.ssh-key-label-field {
  grid-column: 1 / -1;
}

.ssh-key-form > .wide-field {
  grid-column: 1 / 3;
}

.ssh-key-form textarea {
  min-height: 88px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
}

.security-table code {
  display: block;
  max-width: 360px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.security-table table {
  min-width: 820px;
}

.membership-controls label {
  display: block;
}

.membership-controls select {
  width: 100%;
  min-height: 36px;
}

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

.request-shell {
  width: min(980px, 100%);
  padding: 32px;
}

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

.request-header h1 {
  margin-top: 8px;
  font-size: 30px;
}

.request-identity {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.product-label,
.request-status-label {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.request-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 32px;
  padding-top: 28px;
}

.request-form {
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.policy-note {
  min-height: 44px;
  padding: 12px;
  border: 1px solid #b2ccff;
  border-radius: 8px;
  background: var(--accent-quiet);
  color: #164c96;
  font-size: 14px;
}

.policy-note-error {
  border-color: #fecdca;
  background: var(--danger-quiet);
  color: var(--danger);
}

.primary-action {
  min-height: 46px;
  padding: 0 18px;
  font-weight: 600;
}

.request-status {
  align-self: start;
  min-height: 180px;
  padding: 20px 0 20px 24px;
  border-left: 3px solid var(--accent);
}

.request-status strong {
  display: block;
  margin-top: 12px;
  font-size: 19px;
  line-height: 1.35;
}

.request-status p {
  margin-top: 10px;
  line-height: 1.55;
}

.request-history {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.request-history h3 {
  margin: 20px 0 10px;
  font-size: 15px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 48px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #172033;
  color: #ffffff;
  font-size: 14px;
  box-shadow: 0 12px 32px rgb(16 24 40 / 18%);
}

.toast-error {
  background: var(--danger);
}

.scope-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 32px));
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
}

.scope-dialog::backdrop {
  background: rgb(16 24 40 / 44%);
}

.scope-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.scope-dialog-header h2 {
  margin: 5px 0 0;
  font-size: 20px;
}

.dialog-close {
  width: 36px;
  min-height: 36px;
  background: #eef2f6;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.scope-list {
  display: grid;
  gap: 8px;
  overflow: auto;
}

.scope-section-label {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.request-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.request-detail[hidden] {
  display: none;
}

.request-detail div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  background: var(--panel);
}

.request-detail span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.request-detail strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.dialog-actions button {
  min-width: 120px;
  padding: 0 14px;
}

.catalog-context {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.catalog-context span {
  display: grid;
  gap: 2px;
}

.catalog-context small {
  color: var(--muted);
  font-size: 11px;
}

.catalog-context strong {
  font-size: 13px;
}

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

.catalog-fields .check-row {
  align-self: end;
}

.catalog-dialog .notice {
  margin-top: 14px;
}

.catalog-dialog .dialog-actions {
  margin-top: 16px;
}

.scope-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.scope-item span,
.scope-item small {
  color: var(--muted);
}

.auth-error {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-error .panel {
  width: min(520px, 100%);
}

.auth-error h1 {
  margin-top: 10px;
}

.login-body {
  background:
    linear-gradient(90deg, #1473e6 0 6px, transparent 6px),
    var(--bg);
}

.login-shell {
  display: grid;
  width: min(440px, 100%);
  min-height: 100vh;
  align-content: center;
  gap: 24px;
  margin: 0 auto;
  padding: 32px 24px;
}

.login-brand {
  display: grid;
  gap: 8px;
}

.login-brand h1 {
  font-size: 28px;
}

.login-panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 14px 36px rgb(23 32 51 / 8%);
}

.login-panel .section-heading {
  margin-bottom: 18px;
}

.login-form button {
  width: 100%;
  margin-top: 2px;
}

.login-password-toggle {
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  width: fit-content;
  color: var(--text);
}

.login-password-toggle input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}

.login-recovery-link {
  display: inline-flex;
  margin-top: 16px;
  font-size: 14px;
}

.form-error {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid #fecdca;
  border-radius: 6px;
  background: var(--danger-quiet);
  color: var(--danger);
  font-size: 14px;
}

.password-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.password-form label:first-child {
  grid-column: 1 / -1;
}

.password-form button {
  grid-column: 1 / -1;
}

@media (min-width: 681px) {
  .operation-table th:last-child,
  .operation-table td:last-child {
    position: sticky;
    right: 0;
    box-shadow: -1px 0 0 var(--line);
  }

  .operation-table th:last-child {
    z-index: 2;
  }

  .operation-table td:last-child {
    z-index: 1;
    background: var(--panel);
  }
}

@media (max-width: 1100px) {
  .metric-grid,
  .admin-grid,
  .security-grid {
    grid-template-columns: 1fr;
  }

  .inline-form,
  .access-form,
  .member-form,
  .approver-form,
  .ssh-key-form {
    grid-template-columns: 1fr 1fr;
  }

  .ssh-key-submit {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, max-content);
  }

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

@media (max-width: 680px) {
  .section-heading-actions {
    justify-content: flex-start;
  }

  .tenant-settings-panel .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .tenant-settings-panel .pill {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .entitlement-panel .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .worker-status-panel .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .worker-requeue-form {
    grid-template-columns: 1fr;
    min-width: 0;
  }

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

  .entitlement-grid > div,
  .entitlement-grid > div:first-child,
  .entitlement-grid > div:last-child {
    padding: 14px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .entitlement-grid > div:nth-child(-n + 2) {
    padding-top: 0;
    border-top: 0;
  }

  .admin-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .admin-tabs button {
    width: 100%;
    padding: 0 8px;
  }

  .shell,
  .admin-shell,
  .security-shell,
  .request-shell {
    padding: 16px;
  }

  .login-shell {
    padding: 24px 16px;
  }

  .admin-topbar,
  .security-topbar {
    display: grid;
  }

  .platform-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-grid,
  .inline-form,
    .access-form,
    .member-form,
    .approver-form,
    .list-toolbar,
    .saved-views-layout,
    .saved-view-form,
    .catalog-fields,
    .request-form,
    .request-layout,
    .request-detail,
    .security-facts,
    .worker-status-grid,
    .ssh-key-form,
    .ssh-key-generator-fields,
    .ssh-key-preview,
    .ssh-key-command-grid,
    .password-form,
    .owner-summary,
    .permission-check-grid,
    .project-permission-grid {
    grid-template-columns: 1fr;
  }

  .permission-project {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .permission-actions {
    justify-content: stretch;
  }

  .permission-actions button {
    width: 100%;
  }

  .ssh-key-preview div:first-child {
    grid-column: auto;
  }

  .ssh-key-command + .ssh-key-command {
    padding-top: 12px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .ssh-key-submit {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .ssh-key-label-field,
  .ssh-key-form > .wide-field {
    grid-column: auto;
  }

  .ssh-key-submit button {
    width: 100%;
  }

  .password-form label:first-child,
  .password-form button {
    grid-column: auto;
  }

  .access-form .capability-fieldset {
    grid-column: auto;
  }

  .request-header {
    display: grid;
  }

  .request-identity {
    justify-items: start;
  }

  .topbar-actions {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .request-header h1 {
    font-size: 25px;
  }

  .request-layout {
    gap: 22px;
  }

  .request-status {
    min-height: 0;
    padding: 16px 0 0;
    border-top: 3px solid var(--accent);
    border-left: 0;
  }

  .row-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .config-table,
  .history-table,
  .security-table,
  .member-table {
    overflow: visible;
    border: 0;
  }

  .config-table table,
  .history-table table,
  .security-table table,
  .member-table table {
    min-width: 0;
    background: transparent;
  }

  .config-table thead,
  .history-table thead,
  .security-table thead,
  .member-table thead {
    display: none;
  }

  .config-table tbody,
  .history-table tbody,
  .security-table tbody,
  .member-table tbody {
    display: grid;
    gap: 8px;
  }

  .config-table tr,
  .history-table tr,
  .security-table tr,
  .member-table tr {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
  }

  .config-table tr td,
  .history-table tr td,
  .security-table tr td,
  .member-table tr td {
    display: grid;
    grid-template-columns: minmax(88px, 0.7fr) minmax(0, 1.3fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere;
  }

  .config-table tr td:last-child,
  .history-table tr td:last-child,
  .security-table tr td:last-child,
  .member-table tr td:last-child {
    border-bottom: 0;
  }

  .config-table td::before,
  .history-table td::before,
  .security-table td::before,
  .member-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
  }

  .config-table td .small-button,
  .history-table td .small-button,
  .security-table td .small-button,
  .member-table td .small-button {
    justify-self: start;
  }

  .config-table .empty,
  .history-table .empty,
  .security-table .empty,
  .member-table .empty {
    display: block;
  }

  .config-table .empty::before,
  .history-table .empty::before,
  .security-table .empty::before,
  .member-table .empty::before {
    content: none;
  }

  .operation-table {
    overflow: visible;
    border: 0;
  }

  .operation-table table {
    min-width: 0;
    background: transparent;
  }

  .operation-table thead {
    display: none;
  }

  .operation-table tbody {
    display: grid;
    gap: 12px;
  }

  .operation-table tr {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
  }

  .operation-table tr td {
    display: grid;
    grid-template-columns: minmax(84px, 0.65fr) minmax(0, 1.35fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere;
  }

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

  .operation-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
  }

  .operation-table td > .small-button {
    justify-self: start;
  }

  .operation-table .operation-actions {
    grid-template-columns: 1fr;
    padding-top: 12px;
    background: var(--bg);
  }

  .operation-table .operation-actions::before {
    margin-bottom: 2px;
  }

  .operation-table .operation-actions .row-actions {
    width: 100%;
  }

  .operation-table .operation-actions .small-button {
    width: 100%;
  }

  .operation-table .operation-actions > .small-button {
    justify-self: stretch;
  }

  .operation-table .empty {
    display: block;
  }

  .operation-table .empty::before {
    content: none;
  }

  .request-table tr td:nth-child(1) {
    order: 1;
  }

  .request-table tr td:nth-child(2) {
    order: 2;
  }

  .request-table tr td:nth-child(11) {
    order: 3;
  }

  .request-table tr td:nth-child(3) {
    order: 4;
  }

  .request-table tr td:nth-child(4) {
    order: 5;
  }

  .request-table tr td:nth-child(5) {
    order: 6;
  }

  .request-table tr td:nth-child(6) {
    order: 7;
  }

  .request-table tr td:nth-child(7) {
    order: 8;
  }

  .request-table tr td:nth-child(8) {
    order: 9;
  }

  .request-table tr td:nth-child(9) {
    order: 10;
  }

  .request-table tr td:nth-child(10) {
    order: 11;
  }

  .request-table tr td:nth-child(12) {
    order: 12;
  }

  .request-table tr td:nth-child(13) {
    order: 13;
  }

  .grant-table tr td:nth-child(1) {
    order: 1;
  }

  .grant-table tr td:nth-child(7) {
    order: 2;
  }

  .grant-table tr td:nth-child(2) {
    order: 3;
  }

  .grant-table tr td:nth-child(3) {
    order: 4;
  }

  .grant-table tr td:nth-child(4) {
    order: 5;
  }

  .grant-table tr td:nth-child(5) {
    order: 6;
  }

  .grant-table tr td:nth-child(6) {
    order: 7;
  }

  .grant-table tr td:nth-child(8) {
    order: 8;
  }

  .grant-table tr td:nth-child(9) {
    order: 9;
  }
}
