:root {
  color-scheme: light;
  --canvas: #f4f6f8;
  --surface: #ffffff;
  --surface-subtle: #f8fafb;
  --ink: #18212a;
  --muted: #687580;
  --faint: #8a969f;
  --line: #dfe5e8;
  --line-strong: #cbd4d9;
  --accent: #087f70;
  --accent-hover: #06695e;
  --accent-soft: #e9f6f3;
  --danger: #c33f3f;
  --danger-hover: #a93232;
  --danger-soft: #fff0ef;
  --warning: #a96900;
  --warning-soft: #fff5db;
  --shadow: 0 8px 24px rgba(34, 48, 58, 0.08);
  --radius: 6px;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-size: 14px;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button {
  letter-spacing: 0;
}

[hidden] {
  display: none !important;
}

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

.topbar {
  height: 68px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  width: min(1240px, calc(100% - 48px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand__mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: #21313a;
  border-radius: var(--radius);
}

.brand__mark svg {
  width: 19px;
  height: 19px;
}

.brand strong,
.brand small {
  display: block;
  letter-spacing: 0;
}

.brand strong {
  font-size: 16px;
  line-height: 1.2;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

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

.session__state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--faint);
}

.status-dot--online {
  background: #16a176;
  box-shadow: 0 0 0 3px #e5f6ef;
}

.status-dot--offline {
  background: #9ba6ad;
}

.page-shell {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 40px 0 64px;
}

.auth-panel {
  min-height: 280px;
  margin-top: 48px;
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(360px, 1.15fr);
  align-items: center;
  gap: 64px;
  padding: 48px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.eyebrow svg {
  width: 15px;
  height: 15px;
}

.auth-panel h1,
.page-heading h1 {
  margin: 0;
  letter-spacing: 0;
}

.auth-panel h1 {
  font-size: 28px;
  line-height: 1.25;
}

.auth-panel__copy > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
}

.auth-form {
  padding-left: 48px;
  border-left: 1px solid var(--line);
}

.auth-form > label {
  display: block;
  margin-bottom: 8px;
  color: #33414a;
  font-size: 13px;
  font-weight: 600;
}

.auth-form__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.input-wrap {
  position: relative;
  min-width: 0;
}

.input-wrap > svg,
.input-wrap > i:first-child {
  position: absolute;
  z-index: 1;
  left: 13px;
  top: 50%;
  width: 17px;
  height: 17px;
  color: var(--faint);
  transform: translateY(-50%);
}

.input-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 42px 0 40px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.input-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(8, 127, 112, 0.12);
}

.input-action {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.input-action:hover {
  color: var(--ink);
  background: var(--surface-subtle);
}

.input-action svg {
  width: 17px;
  height: 17px;
}

.field-message {
  min-height: 21px;
  margin: 7px 0 0;
  color: var(--danger);
  font-size: 12px;
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.button {
  min-height: 38px;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  font-weight: 600;
  white-space: nowrap;
}

.button svg {
  width: 17px;
  height: 17px;
}

.button--primary {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.button--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.button--secondary {
  color: #2a3942;
  background: var(--surface);
  border-color: var(--line-strong);
}

.button--secondary:hover,
.button--ghost:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: #a9d7ce;
}

.button--ghost {
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}

.button--danger {
  color: #ffffff;
  background: var(--danger);
  border-color: var(--danger);
}

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

.button:disabled,
.icon-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
}

.icon-button:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: #a9d7ce;
}

.icon-button svg {
  width: 16px;
  height: 16px;
}

.workspace {
  min-width: 0;
}

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

.page-heading h1 {
  font-size: 25px;
  line-height: 1.25;
}

.page-heading__status {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.divider {
  width: 1px;
  height: 14px;
  background: var(--line-strong);
}

.mode-bar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(116px, 1fr));
  gap: 3px;
  padding: 3px;
  background: #edf1f3;
  border-radius: 5px;
}

.segment {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
}

.segment:hover {
  color: var(--ink);
}

.segment.is-active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(26, 38, 46, 0.12);
}

.segment svg {
  width: 16px;
  height: 16px;
}

.relay-info {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.relay-info svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.relay-info code {
  max-width: 280px;
  padding: 3px 7px;
  overflow: hidden;
  color: #35434c;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toolbar__primary {
  display: flex;
  align-items: center;
  gap: 9px;
}

.table-shell {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

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

th {
  height: 46px;
  padding-top: 0;
  padding-bottom: 0;
  color: var(--muted);
  background: var(--surface-subtle);
  font-size: 12px;
  font-weight: 600;
}

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

tbody tr:hover {
  background: #fbfcfc;
}

th:nth-child(1) { width: 86px; }
th:nth-child(2) { width: 150px; }
th:nth-child(3) { width: 105px; }
th:nth-child(4) { width: 130px; }
th:nth-child(5) { width: 180px; }
th:nth-child(6) { width: 135px; }
th:nth-child(7) { width: auto; }
th:nth-child(8) { width: 54px; }

.status-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #45535c;
  font-size: 12px;
  white-space: nowrap;
}

.device-name {
  min-width: 0;
}

.device-name strong,
.device-name small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-name strong {
  color: #23313a;
  font-weight: 650;
}

.device-name small {
  margin-top: 2px;
  color: var(--faint);
  font-size: 11px;
}

.os-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #40505a;
  white-space: nowrap;
}

.os-label svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.cell-text {
  display: block;
  overflow: hidden;
  color: #40505a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-subtle {
  color: var(--muted);
  font-size: 12px;
}

.command-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.command-wrap code {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: #2f3d46;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-button {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}

.copy-button.is-copied {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: #a9d7ce;
}

.row-action {
  margin-left: auto;
}

.row-action:hover {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #edbfbb;
}

.loading-state,
.empty-state,
.error-state {
  min-height: 318px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px;
  text-align: center;
}

.loading-state {
  gap: 12px;
  color: var(--muted);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #cdd7db;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

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

.empty-state__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 13px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 50%;
}

.empty-state__icon svg {
  width: 22px;
  height: 22px;
}

.empty-state__icon--error {
  color: var(--danger);
  background: var(--danger-soft);
}

.empty-state strong,
.error-state strong {
  font-size: 15px;
}

.empty-state p,
.error-state p {
  max-width: 420px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.error-state .button {
  margin-top: 16px;
}

.confirm-dialog {
  width: min(440px, calc(100% - 32px));
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(25, 36, 43, 0.2);
}

.confirm-dialog::backdrop {
  background: rgba(24, 33, 42, 0.42);
}

.confirm-dialog form {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 24px;
}

.confirm-dialog__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 50%;
}

.confirm-dialog__icon svg {
  width: 19px;
  height: 19px;
}

.confirm-dialog h2 {
  margin: 1px 0 5px;
  font-size: 17px;
  letter-spacing: 0;
}

.confirm-dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.confirm-dialog__actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 10px;
}

.toast {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 24px;
  min-width: min(340px, calc(100vw - 32px));
  max-width: 460px;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 14px;
  color: #ffffff;
  background: #233139;
  border: 1px solid #34444d;
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(24, 33, 42, 0.2);
}

.toast__icon {
  display: grid;
  place-items: center;
  color: #6ed4b9;
}

.toast__icon svg {
  width: 18px;
  height: 18px;
}

#toastMessage {
  flex: 1;
}

.icon-button--inverse {
  color: #dbe4e7;
  background: transparent;
  border-color: transparent;
}

.icon-button--inverse:hover {
  color: #ffffff;
  background: #34444d;
  border-color: #46575f;
}

@media (max-width: 900px) {
  .auth-panel {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 36px;
  }

  .auth-form {
    padding: 28px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .table-scroll {
    padding: 12px;
  }

  table,
  tbody {
    display: block;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 10px;
  }

  tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 4px 14px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  tbody tr:hover {
    background: var(--surface);
  }

  td {
    min-width: 0;
    padding: 10px 0;
    border-bottom: 0;
  }

  td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--faint);
    font-size: 11px;
  }

  td:nth-child(1),
  td:nth-child(2) {
    align-self: center;
    padding-top: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }

  td:nth-child(1)::before,
  td:nth-child(2)::before,
  td:nth-child(8)::before {
    display: none;
  }

  td:nth-child(1) {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  td:nth-child(2) {
    grid-column: 1;
    grid-row: 1;
  }

  td:nth-child(7) {
    grid-column: 1 / -1;
  }

  td:nth-child(8) {
    position: absolute;
    right: 16px;
    bottom: 12px;
    padding: 0;
  }

  tbody tr {
    position: relative;
  }

  .command-wrap {
    padding-right: 42px;
  }
}

@media (max-width: 620px) {
  .topbar__inner,
  .page-shell {
    width: min(100% - 28px, 1240px);
  }

  .topbar {
    height: 62px;
  }

  .brand small,
  .session__state {
    display: none;
  }

  .page-shell {
    padding-top: 24px;
    padding-bottom: 40px;
  }

  .auth-panel {
    min-height: 0;
    margin-top: 18px;
    padding: 26px 22px;
  }

  .auth-panel h1 {
    font-size: 23px;
  }

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

  .auth-form__row > .button {
    width: 100%;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .mode-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control {
    width: 100%;
  }

  .relay-info {
    padding: 3px 4px 1px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 12px 0;
  }

  .toolbar__primary {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .download-button {
    min-width: 0;
    padding-right: 9px;
    padding-left: 9px;
    white-space: normal;
  }

  #refreshButton {
    align-self: flex-end;
  }

  .table-scroll {
    padding: 9px;
  }

  tbody tr {
    grid-template-columns: 1fr;
  }

  td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
  }

  td:nth-child(2) {
    grid-column: 1;
    grid-row: 1;
    padding-right: 96px;
  }

  td:nth-child(7) {
    grid-column: 1;
  }

  td:nth-child(3),
  td:nth-child(4),
  td:nth-child(5),
  td:nth-child(6) {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
  }

  td:nth-child(3)::before,
  td:nth-child(4)::before,
  td:nth-child(5)::before,
  td:nth-child(6)::before {
    margin-bottom: 0;
  }

  .toast {
    right: 16px;
    bottom: 16px;
  }
}

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

/* Role selection and enrollment surfaces */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.role-view {
  width: min(860px, 100%);
  margin: 64px auto 0;
}

.role-heading {
  max-width: 620px;
  margin: 0 auto 30px;
  text-align: center;
}

.role-heading .eyebrow {
  justify-content: center;
}

.role-heading h1,
.subpage-heading h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.25;
  letter-spacing: 0;
}

.role-heading > p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
}

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

.role-choice {
  min-height: 132px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 24px;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(34, 48, 58, 0.05);
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.role-choice:hover {
  border-color: #9fcfc6;
  box-shadow: 0 8px 22px rgba(34, 48, 58, 0.09);
  transform: translateY(-1px);
}

.role-choice:focus-visible {
  outline: 3px solid rgba(8, 127, 112, 0.16);
  outline-offset: 2px;
  border-color: var(--accent);
}

.role-choice__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
}

.role-choice__icon--input {
  color: var(--accent);
  background: var(--accent-soft);
}

.role-choice__icon--admin {
  color: #476174;
  background: #edf2f5;
}

.role-choice__icon svg {
  width: 23px;
  height: 23px;
}

.role-choice__content {
  min-width: 0;
}

.role-choice__content strong,
.role-choice__content small {
  display: block;
  letter-spacing: 0;
}

.role-choice__content strong {
  margin-bottom: 5px;
  font-size: 17px;
}

.role-choice__content small {
  color: var(--muted);
  font-size: 12px;
}

.role-choice__arrow {
  width: 18px;
  height: 18px;
  color: var(--faint);
}

.input-view {
  width: min(820px, 100%);
  margin: 0 auto;
}

.subpage-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.back-button {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.back-button:hover {
  color: var(--accent);
  border-color: #a9d7ce;
}

.back-button svg {
  width: 17px;
  height: 17px;
}

.enrollment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 36px;
  padding: 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-section {
  min-width: 0;
  margin: 0;
  padding: 0 0 28px;
  border: 0;
}

.form-section--code,
.form-section--os,
.form-footer {
  grid-column: 1 / -1;
}

.form-section > label,
.form-section legend {
  display: block;
  margin-bottom: 9px;
  padding: 0;
  color: #33414a;
  font-size: 13px;
  font-weight: 650;
}

.input-wrap--large input {
  height: 46px;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 15px;
  text-transform: uppercase;
}

.segmented-control--form {
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-segment {
  position: relative;
}

.form-segment input,
.os-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-segment:has(input:checked) {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(26, 38, 46, 0.12);
}

.form-segment:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

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

.os-option {
  position: relative;
  min-width: 0;
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
}

.os-option:hover,
.os-option:has(input:checked) {
  border-color: #8fc8bd;
  background: #fbfefd;
}

.os-option:has(input:focus-visible) {
  outline: 3px solid rgba(8, 127, 112, 0.13);
  outline-offset: 1px;
}

.os-option__mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #4d606b;
  background: #edf2f4;
  border-radius: 5px;
}

.os-option__mark svg {
  width: 18px;
  height: 18px;
}

.os-option strong,
.os-option small {
  display: block;
  letter-spacing: 0;
}

.os-option strong {
  font-size: 14px;
}

.os-option small {
  margin-top: 2px;
  color: var(--faint);
  font-size: 11px;
}

.os-option__check {
  width: 18px;
  height: 18px;
  color: var(--line-strong);
}

.os-option:has(input:checked) .os-option__check {
  color: var(--accent);
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.form-footer .field-message {
  margin: 0;
}

.button--large {
  min-height: 42px;
  padding-right: 18px;
  padding-left: 18px;
}

.auth-panel {
  position: relative;
}

.auth-panel__back {
  position: absolute;
  top: 18px;
  left: 18px;
}

.code-bar {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.code-bar__heading {
  min-width: 210px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.code-bar__heading > span:last-child,
.generated-code > span {
  min-width: 0;
}

.code-bar__heading strong,
.code-bar__heading small,
.generated-code small,
.generated-code code {
  display: block;
  letter-spacing: 0;
}

.code-bar__heading small,
.generated-code small {
  color: var(--muted);
  font-size: 11px;
}

.code-bar__icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 5px;
}

.code-bar__icon svg {
  width: 19px;
  height: 19px;
}

.generated-code {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.generated-code code {
  overflow: hidden;
  color: #233139;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 16px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generated-code > small {
  margin-left: 2px;
  white-space: nowrap;
}

.code-bar > .button {
  margin-left: auto;
}

.toolbar--compact {
  min-height: 54px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 760px) {
  .role-view {
    margin-top: 32px;
  }

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

  .role-choice {
    min-height: 112px;
  }

  .enrollment-form {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 26px 22px;
  }

  .form-section {
    grid-column: 1;
  }

  .code-bar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .code-bar__heading {
    flex: 1 1 220px;
  }

  .generated-code {
    order: 3;
    flex-basis: 100%;
    padding: 12px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 520px) {
  #switchRoleButton span {
    display: none;
  }

  .role-heading {
    text-align: left;
  }

  .role-heading .eyebrow {
    justify-content: flex-start;
  }

  .role-heading h1,
  .subpage-heading h1 {
    font-size: 23px;
  }

  .role-choice {
    grid-template-columns: auto 1fr;
    padding: 20px;
  }

  .role-choice__arrow {
    display: none;
  }

  .os-options {
    grid-template-columns: 1fr;
  }

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

  .form-footer .button {
    width: 100%;
  }

  .code-bar > .button {
    width: 100%;
    margin-left: 0;
  }

  .generated-code > small {
    display: none;
  }
}
