:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #f5f7f8;
  color: #172026;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

button,
input {
  font: inherit;
}

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

.panel {
  width: min(100%, 560px);
  padding: 32px;
  border: 1px solid #d9e0e4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgb(23 32 38 / 10%);
}

.header {
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #57707e;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 2rem;
  line-height: 1.1;
}

h2 {
  margin-bottom: 10px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.stack {
  display: grid;
  gap: 18px;
}

.divider {
  border-top: 1px solid #d9e0e4;
  padding-top: 22px;
}

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

label,
fieldset {
  display: grid;
  gap: 7px;
  color: #31444f;
  font-size: 0.92rem;
  font-weight: 650;
}

fieldset {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.scope-field {
  gap: 8px;
}

legend {
  margin-bottom: 7px;
  padding: 0;
}

.checkbox-label {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  border: 1px solid #b9c5cb;
  border-radius: 6px;
  padding: 10px 12px;
  background: #ffffff;
  font-weight: 650;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #b9c5cb;
  border-radius: 6px;
  padding: 10px 12px;
  color: #172026;
  background: #ffffff;
}

input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: #176f8f;
}

input:focus {
  border-color: #176f8f;
  outline: 3px solid rgb(23 111 143 / 18%);
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 10px 16px;
  color: #ffffff;
  background: #176f8f;
  font-weight: 750;
  cursor: pointer;
}

button:hover {
  background: #105d79;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.credential {
  display: grid;
  gap: 6px;
  border: 1px solid #b8d6c3;
  border-radius: 6px;
  padding: 12px;
  background: #f1fbf4;
  color: #173d24;
}

.credential span {
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

.credential strong {
  overflow-wrap: anywhere;
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 1rem;
}

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

.user-list li {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d9e0e4;
  border-radius: 6px;
  padding: 9px 10px;
}

.user-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  text-align: right;
}

.access-list {
  color: #4f6570;
  font-size: 0.82rem;
}

.pill {
  border-radius: 999px;
  padding: 3px 8px;
  background: #edf2f4;
  color: #435964;
  font-size: 0.75rem;
  font-weight: 750;
}

.pill.admin {
  background: #e7f2f7;
  color: #176f8f;
}

.muted {
  margin-bottom: 0;
  color: #4f6570;
  line-height: 1.55;
}

.error {
  min-height: 1.2em;
  margin-bottom: 0;
  color: #b42318;
  font-size: 0.9rem;
  line-height: 1.35;
}

[hidden] {
  display: none !important;
}

@media (max-width: 520px) {
  .inline-form {
    grid-template-columns: 1fr;
  }

  .user-list li,
  .user-meta {
    align-items: flex-start;
  }

  .user-list li {
    flex-direction: column;
  }

  .user-meta {
    justify-content: flex-start;
    text-align: left;
  }
}
