:root {
  color-scheme: light dark;
  --navy: #05275a;
  --teal: #078a99;
  --pale-teal: #d8eff1;
  --page: #f8fbfb;
  --surface: #fff;
  --soft: #e8f4f5;
  --text: #05275a;
  --muted: #59697a;
  --accent-text: #056b78;
  --line: rgba(5, 39, 90, 0.14);
  --focus: #078a99;
  --danger: #a52235;
  --danger-soft: #fff0f2;
  --primary: #05275a;
  --primary-text: #fff;
  font-family:
    ui-rounded,
    "Avenir Next",
    Avenir,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  min-width: 320px;
  min-height: 100dvh;
}
a {
  color: inherit;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
button {
  min-height: 42px;
  border-radius: 999px;
  padding: 0.55rem 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid transparent;
  white-space: nowrap;
}
button:not(:disabled):active {
  transform: scale(0.98);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.primary {
  background: var(--primary);
  color: var(--primary-text);
}
.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}
.quiet {
  background: transparent;
  color: var(--accent-text);
}
.danger-outline {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
.danger {
  background: var(--danger);
  color: #fff;
}
.header {
  padding: 1rem max(1.5rem, calc((100vw - 1240px) / 2));
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line);
  min-height: 88px;
}
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.brand img {
  display: block;
  width: 150px;
  height: auto;
}
.workspace-label {
  padding-left: 1.5rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.header-account {
  margin-left: auto;
  display: flex;
  gap: 0.8rem;
  align-items: center;
  font-size: 0.85rem;
  min-width: 0;
}
.header-account span {
  overflow-wrap: anywhere;
}
main {
  max-width: 1240px;
  padding: 0 1.5rem;
  margin: auto;
  min-height: calc(100dvh - 155px);
}
footer {
  max-width: 1192px;
  margin: 2rem auto 0;
  padding: 1rem 0 1.4rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}
.auth-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 5rem;
  align-items: center;
  min-height: 70dvh;
  padding: 3rem 4rem;
}
.eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent-text);
  letter-spacing: 0.06em;
}
.auth-intro h1 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin: 1rem 0;
}
.auth-intro > p:last-child {
  color: var(--muted);
  line-height: 1.6;
  max-width: 25rem;
}
.auth-panel {
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  max-width: 450px;
}
h2 {
  font-size: 1.25rem;
  letter-spacing: -0.025em;
  margin: 0 0 0.65rem;
}
h1 {
  font-size: 2.15rem;
  letter-spacing: -0.04em;
  margin: 0;
}
.muted {
  color: var(--muted);
  line-height: 1.5;
}
label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  margin: 1rem 0;
}
input,
select {
  min-height: 44px;
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--page);
  color: var(--text);
  font-weight: 400;
}
input::placeholder {
  color: var(--muted);
}
input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  flex-shrink: 0;
  accent-color: var(--teal);
}
small {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}
form > button.primary {
  margin-top: 0.5rem;
}
#auth-message:empty,
#users-message:empty,
#dialog-message:empty,
#stepup-message:empty {
  display: none;
}
[role="status"] {
  line-height: 1.5;
  font-size: 0.9rem;
}
.error {
  color: var(--danger);
}
.workspace-nav {
  display: flex;
  border-bottom: 1px solid var(--line);
  padding-top: 1rem;
}
.workspace-nav a {
  padding: 1rem 0.1rem;
  color: var(--accent-text);
  border-bottom: 3px solid var(--teal);
  font-weight: 800;
  text-decoration: none;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  gap: 1rem;
}
.page-heading p {
  margin: 0.55rem 0 0;
}
.toolbar {
  display: flex;
  gap: 0.6rem;
  align-items: end;
  margin: 1.75rem 0 1.3rem;
}
.search-label {
  margin: 0;
  flex: 1;
  max-width: 400px;
}
.toolbar > button {
  margin-bottom: 1px;
}
.toolbar > span {
  margin-left: auto;
  align-self: center;
  font-size: 0.85rem;
}
.table-scroll {
  position: relative;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
table {
  border-collapse: collapse;
  text-align: left;
  width: 100%;
  min-width: 800px;
  font-size: 0.88rem;
}
th {
  font-weight: 700;
  color: var(--muted);
  padding: 0.9rem 1rem;
  background: var(--soft);
  font-size: 0.8rem;
}
td {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tbody tr:last-child td {
  border-bottom: 0;
}
td:first-child {
  min-width: 220px;
  max-width: 320px;
  overflow-wrap: anywhere;
}
td strong {
  display: block;
  margin-bottom: 0.2rem;
  font-weight: 700;
}
td small {
  display: block;
}
.status {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  background: var(--soft);
  color: var(--accent-text);
  font-weight: 700;
}
.status.restricted,
.status.pending_deletion {
  color: var(--danger);
  background: var(--danger-soft);
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.pagination > div {
  display: flex;
  gap: 0.5rem;
}
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}
.empty-state p {
  color: var(--muted);
}
.operation-banner {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  background: var(--soft);
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}
.operation-banner strong {
  white-space: nowrap;
}
.operation-banner button {
  margin-left: auto;
}
.operation-banner span {
  overflow-wrap: anywhere;
}
dialog {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.75rem;
  width: calc(100% - 2rem);
  max-width: 570px;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  box-shadow: 0 20px 80px rgba(5, 39, 90, 0.18);
}
dialog::backdrop {
  background: rgba(3, 26, 59, 0.45);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.dialog-heading h2 {
  margin: 0;
}
.detail-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1.25rem 0;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.checkbox {
  flex-direction: row;
  align-items: center;
  font-weight: 400;
  line-height: 1.5;
}
.form-actions {
  display: flex;
  justify-content: end;
  gap: 0.6rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.destructive-notice {
  padding: 1rem;
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  line-height: 1.5;
}
#user-summary {
  font-size: 0.85rem;
  line-height: 1.8;
  background: var(--soft);
  padding: 0.8rem 1rem;
  border-radius: 10px;
  overflow-wrap: anywhere;
}
#enrollment {
  text-align: center;
}
#mfa-qr {
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  margin: 1rem;
}
details {
  text-align: left;
  font-size: 0.85rem;
}
code {
  display: block;
  overflow-wrap: anywhere;
  user-select: all;
  padding: 0.8rem;
  background: var(--soft);
  border-radius: 8px;
  margin: 0.5rem 0;
}
.skip-link {
  position: fixed;
  left: 1rem;
  top: -100px;
  z-index: 10;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-text);
}
.skip-link:focus {
  top: 1rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #031a3b;
    --surface: #082b5b;
    --soft: #0b315f;
    --text: #fff;
    --muted: #c3cede;
    --accent-text: #49bdc7;
    --line: rgba(216, 239, 241, 0.18);
    --focus: #49bdc7;
    --danger: #ff9caf;
    --danger-soft: #432138;
    --primary: #d8eff1;
    --primary-text: #05275a;
  }
  .danger {
    background: #a52235;
    color: #fff;
  }
}
@media (max-width: 800px) {
  .auth-layout {
    padding: 2rem 0;
    gap: 2rem;
    grid-template-columns: 1fr;
  }
  .auth-intro h1 br {
    display: none;
  }
  .auth-intro h1 {
    font-size: 2.2rem;
  }
  .auth-panel {
    width: 100%;
    max-width: none;
  }
  .header {
    padding: 1rem;
    gap: 0.8rem;
    flex-wrap: wrap;
  }
  .workspace-label {
    padding-left: 0.8rem;
    font-size: 0.8rem;
  }
  .header-account {
    width: 100%;
    justify-content: space-between;
  }
  .page-heading {
    padding-top: 1.5rem;
  }
  .toolbar {
    flex-wrap: wrap;
    align-items: end;
  }
  .search-label {
    flex-basis: 100%;
    max-width: none;
  }
  .toolbar > span {
    margin-left: auto;
  }
  .operation-banner {
    flex-wrap: wrap;
  }
  .operation-banner span {
    flex-basis: 100%;
  }
  footer {
    margin-inline: 1.5rem;
  }
  main {
    padding-inline: 1rem;
  }
  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  dialog {
    padding: 1.25rem;
  }
  .detail-actions button {
    font-size: 0.82rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  button:not(:disabled):active {
    transform: none;
  }
}
