:root {
  color-scheme: dark;
  --smoke-0: hsl(0 0% 94%);
  --smoke-50: hsl(0 0% 78%);
  --smoke-100: hsl(0 0% 65%);
  --smoke-200: hsl(0 0% 58%);
  --smoke-300: hsl(0 0% 52%);
  --smoke-400: hsl(0 0% 45%);
  --smoke-500: hsl(0 0% 38%);
  --smoke-600: hsl(0 0% 23%);
  --smoke-700: hsl(0 0% 15%);
  --smoke-800: hsl(0 0% 11%);
  --smoke-900: hsl(0 0% 9%);
  --smoke-950: hsl(0 0% 7%);
  --smoke-1000: hsl(0 0% 2%);
  --secure-600: hsl(122 100% 76%);
  --pulse-600: hsl(49 100% 66%);
  --defend-500: hsl(191 100% 48%);
  --defend-900: hsl(190 36% 19%);
  --ascend-600: hsl(356 100% 69%);
  --rose: hsl(331.12 100% 63.333%);
  --gold: hsl(40 100% 58.235%);
  --black: hsl(0 0% 0%);

  --foreground: var(--smoke-0);
  --background: var(--smoke-1000);
  --background-tier-1: var(--smoke-950);
  --background-tier-2: var(--smoke-800);
  --background-tier-3: var(--smoke-700);
  --input: var(--smoke-900);
  --border: var(--smoke-600);
  --primary: var(--smoke-0);
  --primary-foreground: var(--smoke-1000);
  --secondary-foreground: var(--smoke-300);
  --success: color-mix(in hsl, var(--secure-600) 20%, transparent);
  --success-foreground: var(--secure-600);
  --warn: color-mix(in hsl, var(--pulse-600) 20%, transparent);
  --warn-foreground: var(--pulse-600);
  --fail: color-mix(in hsl, var(--ascend-600) 20%, transparent);
  --fail-foreground: var(--ascend-600);
  --overlay: color-mix(in hsl, var(--black) 70%, transparent);
  --ring: var(--rose);
  --font-body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Arial Black", "Helvetica Neue", sans-serif;
  --font-accent: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --shadow-card: 0 0 30px color-mix(in hsl, #131313 32%, transparent);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-width: 1100px;
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled,
select:disabled,
input:disabled {
  cursor: not-allowed;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

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

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: .025em;
  line-height: 1.1;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 8px;
  font-size: 28px;
}

h2 {
  font-size: 20px;
}

code,
.mono-value {
  font-family: var(--font-mono);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
}

.brand-lockup[href]:hover .brand-name {
  color: var(--rose);
}

.brand-mark {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--rose), var(--gold));
  color: var(--black);
  font-size: 12px;
  font-weight: 700;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: color 150ms ease;
}

.button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

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

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

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

.button-secondary,
.button-ghost,
.button-inline {
  border-color: var(--border);
  background: transparent;
  color: var(--foreground);
}

.button-secondary:hover,
.button-ghost:hover,
.button-inline:hover {
  background: var(--background-tier-2);
}

.button-ghost {
  color: var(--secondary-foreground);
}

.button-danger {
  border-color: var(--fail-foreground);
  background: transparent;
  color: var(--fail-foreground);
}

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

.button-disabled,
.button:disabled {
  border-color: var(--border);
  background: var(--background-tier-2);
  color: var(--smoke-500);
  opacity: 1;
}

.button-full {
  width: 100%;
}

.button-small {
  min-height: 30px;
  padding: 0 11px;
  font-size: 12.5px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.table-actions form {
  margin: 0;
}

.button-panel {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
}

.button-inline {
  min-height: 26px;
  padding: 0 9px;
  color: var(--secondary-foreground);
  font-size: 11.5px;
}

.button-development {
  border-color: var(--pulse-600);
  background: var(--pulse-600);
  color: var(--black);
  font-weight: 600;
}

.app-header {
  position: relative;
  z-index: 20;
  display: flex;
  height: 56px;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--border);
  background: var(--background-tier-1);
}

.app-header-primary,
.app-header-account,
.primary-navigation,
.account-identity {
  display: flex;
  align-items: center;
}

.app-header-primary {
  gap: 28px;
}

.primary-navigation {
  gap: 4px;
}

.nav-item {
  display: inline-flex;
  height: 30px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border-radius: 6px;
  color: var(--secondary-foreground);
  font-size: 13px;
  font-weight: 500;
}

.nav-item svg {
  width: 15px;
  height: 15px;
}

.nav-item:hover,
.nav-item[aria-current="page"] {
  background: var(--background-tier-2);
  color: var(--foreground);
}

.app-header-account {
  gap: 14px;
}

.account-identity {
  gap: 9px;
  padding-right: 14px;
  border-right: 1px solid var(--border);
}

.avatar {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 5px;
  background: var(--defend-900);
  color: var(--defend-500);
  font-size: 11px;
  font-weight: 600;
}

.identity-copy {
  display: grid;
  line-height: 1.25;
}

.identity-copy strong {
  font-size: 13px;
  font-weight: 500;
}

.identity-copy span {
  max-width: 240px;
  overflow: hidden;
  color: var(--secondary-foreground);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-header form {
  margin: 0;
}

.app-content {
  min-width: 1024px;
  padding: 32px;
}

.admin-content {
  min-width: 1216px;
}

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

.page-heading > div:first-child {
  max-width: 900px;
}

.page-heading p {
  margin: 0;
  color: var(--secondary-foreground);
  font-size: 13.5px;
}

.panel,
.admin-table-panel,
.account-detail-panel,
.audit-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background-tier-1);
}

.panel-label,
.detail-section h3 {
  margin: 0;
  color: var(--secondary-foreground);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.panel-label {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 4px;
  background: color-mix(in hsl, var(--smoke-500) 20%, transparent);
  color: var(--secondary-foreground);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
}

.badge svg,
.verification-state svg {
  width: 11px;
  height: 11px;
  stroke-width: 2;
}

.badge[data-status="active"],
.badge[data-status="sent"],
.badge[data-status="success"] {
  background: var(--success);
  color: var(--success-foreground);
}

.badge[data-status="pending_verification"],
.badge[data-status="queued"],
.badge[data-status="retrying"],
.badge[data-status="pending"] {
  background: var(--warn);
  color: var(--warn-foreground);
}

.badge[data-status="failed"],
.badge[data-status="failure"],
.badge[data-status="error"] {
  background: var(--fail);
  color: var(--fail-foreground);
}

.badge[data-status="disabled"],
.badge[data-status="revoked"] {
  background: color-mix(in hsl, var(--smoke-500) 20%, transparent);
  color: var(--secondary-foreground);
}

.badge-role[data-role="participant"] {
  background: color-mix(in hsl, var(--smoke-50) 20%, transparent);
  color: var(--smoke-50);
}

.badge-role[data-role="facilitator"] {
  background: color-mix(in hsl, var(--defend-500) 20%, transparent);
  color: var(--defend-500);
}

.badge-role[data-role="range_admin"] {
  background: color-mix(in hsl, var(--gold) 20%, transparent);
  color: var(--gold);
}

.badge-admin {
  background: color-mix(in hsl, var(--gold) 20%, transparent);
  color: var(--gold);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.status-success {
  color: var(--success-foreground) !important;
}

.status-warning {
  color: var(--warn-foreground) !important;
}

.status-privileged {
  color: var(--gold) !important;
}

.inline-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background);
}

.inline-banner > svg {
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

.inline-banner strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 500;
}

.inline-banner p {
  margin: 0;
  color: var(--secondary-foreground);
  font-size: 12.5px;
}

.inline-banner-success {
  border-color: var(--success-foreground);
  background: var(--success);
  color: var(--success-foreground);
}

.inline-banner-warning {
  border-color: var(--warn-foreground);
  background: var(--warn);
  color: var(--warn-foreground);
}

.inline-banner-error {
  border-color: var(--fail-foreground);
  background: var(--fail);
  color: var(--fail-foreground);
}

.inline-banner-neutral {
  color: var(--foreground);
}

.compact-banner {
  margin-top: 14px;
}

.form-stack {
  display: grid;
  gap: 14px;
}

.form-stack label,
.sheet-body > label,
.sheet-field-grid label,
.membership-form label {
  display: grid;
  gap: 6px;
  color: var(--foreground);
  font-size: 12px;
  font-weight: 500;
}

input,
select {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--input);
  color: var(--foreground);
}

input::placeholder {
  color: var(--smoke-400);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-status {
  display: flex;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background);
  color: var(--secondary-foreground);
  font-size: 12.5px;
}

.form-status:empty {
  display: none;
}

.form-status.error-text,
.auth-state.error-text {
  border-color: var(--fail-foreground);
  background: var(--fail);
  color: var(--fail-foreground);
}

.form-status.success-text,
.auth-state.success-text {
  border-color: var(--success-foreground);
  background: var(--success);
  color: var(--success-foreground);
}

.auth-page {
  min-height: 100vh;
}

.login-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(540px, 1fr) 560px;
}

.login-introduction {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 56px 56px 72px;
  border-right: 1px solid var(--border);
}

.login-introduction .brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 14px;
}

.login-introduction .brand-name {
  font-size: 15px;
}

.login-message {
  max-width: 470px;
}

.terminal-kicker {
  margin-bottom: 14px;
  color: var(--secondary-foreground);
  font-family: var(--font-accent);
  font-size: 19px;
  letter-spacing: .02em;
}

.login-message h1 {
  margin-bottom: 18px;
  font-size: 38px;
}

.login-message > p:last-child {
  margin: 0;
  color: var(--secondary-foreground);
  font-size: 15px;
}

.identity-separation-note {
  max-width: 620px;
  margin: 0;
  color: var(--secondary-foreground);
  font-size: 12px;
}

.login-methods {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 56px 72px 56px 40px;
  background: var(--background-tier-1);
}

.method-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background);
}

.method-card h2 {
  margin: 0 0 4px;
  font-size: 19px;
}

.method-card-heading > p,
.invitation-heading p,
.invitation-card > p {
  color: var(--secondary-foreground);
}

.method-card-heading > p {
  margin-bottom: 20px;
  font-size: 12.5px;
}

.password-control {
  position: relative;
  display: block;
}

.password-control input {
  padding-right: 76px;
}

.password-toggle {
  position: absolute;
  top: 6px;
  right: 6px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--background-tier-2);
  color: var(--secondary-foreground);
  font-size: 11px;
}

.secure-return-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--secondary-foreground);
  font-size: 11.5px;
}

.secure-return-note svg {
  width: 13px;
  height: 13px;
}

.secure-return-note code {
  color: var(--foreground);
}

.method-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--secondary-foreground);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.method-divider::before,
.method-divider::after {
  height: 1px;
  flex: 1;
  background: var(--border);
  content: "";
}

.invitation-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.invitation-heading h2 {
  margin: 0 0 1px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.invitation-heading p {
  margin: 0;
  font-size: 12px;
}

.method-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background-tier-2);
}

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

.invitation-card > p {
  margin-bottom: 16px;
  font-size: 13px;
}

.arrival-help {
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.arrival-help h3 {
  margin-bottom: 8px;
  color: var(--secondary-foreground);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.arrival-help ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: var(--secondary-foreground);
  font-size: 12.5px;
  list-style: none;
}

.arrival-help li {
  position: relative;
  padding-left: 14px;
}

.arrival-help li::before {
  position: absolute;
  top: .55em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--smoke-500);
  content: "";
}

.development-card {
  padding: 18px;
  border: 1px dashed var(--pulse-600);
  border-radius: 8px;
  background: color-mix(in hsl, var(--pulse-600) 8%, transparent);
}

.development-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.development-heading h2 {
  margin: 0;
  color: var(--pulse-600);
  font-family: var(--font-accent);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.development-heading span {
  padding: 3px 6px;
  border: 1px solid var(--pulse-600);
  border-radius: 4px;
  color: var(--pulse-600);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.development-card p {
  margin-bottom: 14px;
  color: var(--secondary-foreground);
  font-size: 12.5px;
}

.confirmation-layout {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 56px;
}

.confirmation-card {
  width: 560px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background-tier-1);
  box-shadow: var(--shadow-card);
}

.safe-url-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background);
  color: var(--secondary-foreground);
  font-size: 12px;
}

.safe-url-note svg {
  color: var(--success-foreground);
}

.safe-url-note span {
  margin-left: auto;
  font-size: 11px;
}

.confirmation-card h1 {
  font-size: 26px;
}

.confirmation-card > p:not(.auth-state) {
  margin-bottom: 20px;
  color: var(--secondary-foreground);
  font-size: 13.5px;
}

.auth-state {
  min-height: 64px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background);
  color: var(--secondary-foreground);
  font-size: 13px;
  font-weight: 500;
}

.confirmation-actions {
  display: flex;
  gap: 10px;
}

.single-use-note {
  display: flex;
  width: 560px;
  gap: 8px;
  margin: 0;
  color: var(--secondary-foreground);
  font-size: 12px;
}

.single-use-note svg {
  width: 14px;
  height: 14px;
  margin-top: 2px;
}

.range-heading-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-control {
  position: relative;
  display: block;
}

.search-control svg {
  position: absolute;
  top: 11px;
  left: 10px;
  width: 14px;
  height: 14px;
  color: var(--secondary-foreground);
  pointer-events: none;
}

.search-control input {
  padding-left: 30px;
}

.range-heading-tools .search-control input {
  width: 220px;
}

.count-control {
  display: inline-flex;
  height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background-tier-1);
  color: var(--secondary-foreground);
  font-size: 12.5px;
}

.count-control code {
  color: var(--foreground);
  font-size: 13px;
}

.range-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(600px, 1fr));
  gap: 12px;
}

.range-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background-tier-1);
  transition: background 140ms ease;
}

.range-row:hover {
  background: var(--background-tier-2);
}

.range-code {
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background-tier-3);
  color: var(--defend-500);
  font-family: var(--font-mono);
  font-size: 14px;
}

.range-summary {
  min-width: 0;
  flex: 1;
}

.range-summary h2 {
  margin: 0 0 6px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.range-metadata {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.persona-label,
.entry-warning {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--secondary-foreground);
  font-size: 11.5px;
}

.persona-label svg,
.entry-warning svg {
  width: 11px;
  height: 11px;
}

.persona-label code {
  color: var(--foreground);
}

.entry-warning {
  color: var(--warn-foreground);
}

.range-action {
  flex: none;
  text-align: right;
}

.range-action > span:last-child {
  display: block;
  max-width: 220px;
  margin-top: 6px;
  overflow: hidden;
  color: var(--secondary-foreground);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state,
.empty-filter-state {
  display: flex;
  max-width: 840px;
  align-items: flex-start;
  gap: 24px;
  padding: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background-tier-1);
}

.empty-state-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background-tier-2);
  color: var(--secondary-foreground);
}

.empty-state-icon svg {
  width: 20px;
  height: 20px;
}

.state-list {
  display: grid;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  color: var(--secondary-foreground);
  font-size: 13px;
  list-style: none;
}

.state-list li::before {
  margin-right: 9px;
  content: "—";
}

.state-list .state-success {
  color: var(--foreground);
}

.state-list .state-success::before {
  color: var(--success-foreground);
  content: "✓";
}

.empty-state-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--secondary-foreground);
  font-size: 12.5px;
}

.empty-filter-state {
  display: block;
  margin-top: 12px;
}

.empty-filter-state h2 {
  margin-bottom: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}

.empty-filter-state p {
  margin: 0;
  color: var(--secondary-foreground);
  font-size: 12.5px;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  align-items: start;
  gap: 16px;
}

.account-side-column {
  display: grid;
  gap: 16px;
}

.profile-rows {
  margin: 0;
}

.profile-rows > div {
  display: flex;
  min-height: 51px;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}

.profile-rows dt {
  width: 180px;
  flex: none;
  color: var(--secondary-foreground);
  font-size: 12.5px;
}

.profile-rows dd {
  margin: 0;
  font-size: 13.5px;
}

.panel-footnote,
.security-footnote {
  margin: 0;
  padding: 13px 18px;
  color: var(--secondary-foreground);
  font-size: 12px;
}

.method-summary-row,
.password-method-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.method-summary-row {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.method-summary-row > svg,
.password-method-heading > svg {
  width: 16px;
  height: 16px;
}

.method-summary-row > span:nth-child(2),
.password-method-heading > span:nth-child(2) {
  display: grid;
  flex: 1;
}

.method-summary-row strong,
.password-method-heading strong,
.identity-explainer strong {
  font-size: 13.5px;
  font-weight: 500;
}

.method-summary-row small,
.password-method-heading small {
  color: var(--secondary-foreground);
  font-size: 11.5px;
}

.password-method {
  padding: 16px 18px 0;
}

.password-method-heading {
  margin-bottom: 14px;
}

.password-form {
  margin-top: 14px;
}

.field-label-row {
  display: flex;
  justify-content: space-between;
}

.field-label-row output {
  color: var(--secondary-foreground);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
}

.field-label-row output.is-short {
  color: var(--fail-foreground);
}

.security-footnote {
  margin-top: 14px;
  padding-inline: 0;
  border-top: 1px solid var(--border);
}

.identity-explainer > div {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
}

.identity-explainer > div p {
  margin: 3px 0 0;
  color: var(--secondary-foreground);
  font-size: 12px;
}

.mattermost-registration-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  align-items: start;
  gap: 16px;
}

.mattermost-registration-body {
  padding: 18px;
}

.mattermost-registration-body .form-status {
  margin-bottom: 16px;
}

.mattermost-registration-body input[readonly] {
  color: var(--secondary-foreground);
  cursor: default;
}

.mattermost-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-help {
  color: var(--secondary-foreground);
  font-size: 11.5px;
  font-weight: 400;
}

.mattermost-account-found {
  margin-bottom: 16px;
}

.mattermost-workspace-panel .profile-rows dt {
  width: 135px;
}

.admin-page-heading {
  margin-bottom: 20px;
}

.admin-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.banner-slot {
  display: grid;
  min-height: 0;
  gap: 8px;
  margin-bottom: 18px;
}

.banner-slot:empty {
  display: none;
}

.admin-stat-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background-tier-1);
}

.admin-stat-strip > div {
  padding: 13px 16px;
  border-left: 1px solid var(--border);
}

.admin-stat-strip > div:first-child {
  border-left: 0;
}

.admin-stat-strip strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 400;
}

.admin-stat-strip span {
  display: block;
  margin-top: 2px;
  color: var(--secondary-foreground);
  font-size: 11.5px;
}

.admin-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.admin-tabs a {
  padding: 0 2px 11px;
  color: var(--secondary-foreground);
  font-size: 13.5px;
  font-weight: 500;
}

.admin-tabs a[aria-current="page"] {
  box-shadow: inset 0 -2px var(--foreground);
  color: var(--foreground);
}

.admin-tabs code {
  margin-left: 4px;
  color: var(--secondary-foreground);
  font-size: 12px;
}

.admin-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.admin-search {
  width: 300px;
}

.admin-filter-bar select {
  width: 180px;
}

.filter-result-count {
  margin-left: auto;
  color: var(--secondary-foreground);
  font-size: 12px;
}

.admin-master-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 480px;
  align-items: start;
  gap: 16px;
}

.admin-table-panel,
.audit-panel {
  overflow: hidden;
}

.table-scroll {
  width: 100%;
  overflow: auto;
}

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

.account-table {
  min-width: 980px;
}

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

th {
  background: var(--background);
  color: var(--secondary-foreground);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  color: var(--secondary-foreground);
  font-size: 11.5px;
}

.account-table tbody tr {
  transition: background 120ms ease;
}

.account-table tbody tr:hover,
.account-table tbody tr[aria-current="true"] {
  background: var(--background-tier-2);
}

.account-table th:first-child,
.account-table td:first-child {
  min-width: 240px;
}

.account-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--foreground);
}

.avatar-small {
  width: 26px;
  height: 26px;
  flex: none;
  font-size: 10.5px;
}

.account-cell > span:nth-child(2) {
  display: grid;
  min-width: 0;
  flex: 1;
}

.account-cell strong,
.account-cell code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-cell strong {
  font-size: 12.5px;
  font-weight: 500;
}

.account-cell strong em {
  color: var(--secondary-foreground);
  font-style: normal;
  font-weight: 400;
}

.account-cell code {
  color: var(--secondary-foreground);
  font-size: 11px;
}

.mini-admin-badge {
  padding: 1px 4px;
  border-radius: 3px;
  background: color-mix(in hsl, var(--gold) 20%, transparent);
  color: var(--gold);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.verification-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
}

.delivery-state {
  display: block;
  margin-top: 2px;
  color: var(--secondary-foreground);
  font-size: 10.5px;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  color: var(--secondary-foreground);
  font-size: 12px;
}

.table-empty-state {
  padding: 48px 16px;
  text-align: center;
}

.table-empty-state strong,
.table-empty-state span {
  display: block;
}

.table-empty-state strong {
  margin-bottom: 6px;
  color: var(--foreground);
  font-size: 13.5px;
}

.account-detail-panel {
  position: sticky;
  top: 16px;
  overflow: hidden;
}

.account-detail-heading {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.account-detail-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
}

.avatar-large {
  width: 36px;
  height: 36px;
  flex: none;
  font-size: 13px;
}

.account-detail-identity > span:last-child {
  display: grid;
  min-width: 0;
}

.account-detail-identity strong {
  font-size: 15px;
  font-weight: 500;
}

.account-detail-identity code {
  overflow: hidden;
  color: var(--secondary-foreground);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.account-detail-meta > div {
  padding: 11px 18px;
  border-top: 1px solid var(--border);
}

.account-detail-meta > div:nth-child(-n+2) {
  border-top: 0;
}

.account-detail-meta dt {
  color: var(--secondary-foreground);
  font-size: 10.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.account-detail-meta dd {
  margin: 3px 0 0;
  font-size: 12.5px;
}

.detail-section {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.detail-section:last-child {
  border-bottom: 0;
}

.detail-section h3 {
  margin-bottom: 12px;
}

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

.detail-section-heading h3 {
  margin: 0;
}

.detail-section-heading code {
  color: var(--secondary-foreground);
  font-size: 11.5px;
}

.delivery-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background);
}

.delivery-summary > svg {
  width: 14px;
  height: 14px;
  color: var(--secondary-foreground);
}

.delivery-summary > span {
  display: grid;
}

.delivery-summary strong {
  font-size: 12.5px;
  font-weight: 500;
}

.delivery-summary small {
  color: var(--secondary-foreground);
  font-size: 11.5px;
}

.delivery-summary[data-status="sent"] {
  border-color: var(--success-foreground);
  background: var(--success);
}

.delivery-summary[data-status="queued"],
.delivery-summary[data-status="retrying"] {
  border-color: var(--warn-foreground);
  background: var(--warn);
}

.delivery-summary[data-status="failed"] {
  border-color: var(--fail-foreground);
  background: var(--fail);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-actions form,
.control-stack form {
  margin: 0;
}

.control-stack {
  display: grid;
  gap: 10px;
}

.control-note {
  display: flex;
  gap: 6px;
  margin: -4px 0 0;
  color: var(--secondary-foreground);
  font-size: 11.5px;
}

.membership-list {
  display: grid;
  gap: 8px;
}

.membership-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background);
}

.membership-row > div {
  display: grid;
  min-width: 0;
  flex: 1;
}

.membership-row > div > strong {
  font-size: 12.5px;
  font-weight: 500;
}

.membership-row > div > span {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  color: var(--secondary-foreground);
  font-size: 11px;
}

.membership-row .badge {
  min-height: 18px;
  padding: 1px 6px;
  font-size: 10.5px;
}

.membership-status {
  font-size: 11px;
}

.detail-empty-state {
  padding: 14px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background);
  color: var(--secondary-foreground);
  font-size: 12.5px;
}

.membership-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.membership-form h4 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 500;
}

.membership-form-help {
  margin: -4px 0 10px;
  color: var(--secondary-foreground);
  font-size: 11.5px;
  line-height: 1.5;
}

.range-access-grid {
  display: grid;
  gap: 8px;
}

.range-access-option {
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background);
}

.range-access-toggle {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 9px !important;
}

.range-access-toggle input {
  width: 16px;
  height: 16px;
  flex: none;
  margin: 1px 0 0;
}

.range-access-toggle span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.range-access-toggle strong {
  font-size: 12.5px;
  font-weight: 500;
}

.range-access-toggle small {
  color: var(--secondary-foreground);
  font-size: 11px;
  font-weight: 400;
}

.range-access-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.range-access-option:not(.is-selected) .range-access-fields {
  opacity: .58;
}

.range-access-fields select {
  height: 34px;
}

.membership-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.membership-form-grid input,
.membership-form-grid select {
  height: 34px;
}

.membership-persona-field {
  grid-column: 1 / -1;
}

.membership-form-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
}

.membership-form-actions span {
  color: var(--secondary-foreground);
  font-size: 11px;
}

.detail-empty-panel {
  padding: 28px;
}

.detail-empty-panel h2 {
  font-size: 18px;
}

.detail-empty-panel p {
  margin: 0;
  color: var(--secondary-foreground);
}

.audit-table {
  min-width: 960px;
}

.audit-table td {
  padding: 11px 16px;
  color: var(--foreground);
  font-size: 12.5px;
}

.audit-table td:first-child,
.audit-table td:nth-child(4) {
  color: var(--secondary-foreground);
  font-size: 11.5px;
}

.audit-target {
  display: grid;
  gap: 2px;
}

.audit-target strong {
  color: var(--foreground);
  font-size: 12.5px;
  font-weight: 500;
}

.audit-target code {
  color: var(--secondary-foreground);
  font-size: 10.5px;
}

.confirm-dialog {
  width: 480px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background-tier-1);
  color: var(--foreground);
  box-shadow: var(--shadow-card);
}

.confirm-dialog::backdrop {
  background: var(--overlay);
}

.dialog-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 22px;
}

.dialog-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: none;
  place-items: center;
  border-radius: 6px;
  font-weight: 700;
}

.dialog-icon-danger {
  background: var(--fail);
  color: var(--fail-foreground);
}

.dialog-icon-warning {
  background: var(--warn);
  color: var(--warn-foreground);
}

.dialog-body h2 {
  margin: 3px 0 10px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.dialog-body p {
  margin-bottom: 12px;
  color: var(--secondary-foreground);
  font-size: 13px;
}

.dialog-body code {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background);
  color: var(--foreground);
  font-size: 11.5px;
}

.dialog-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
}

.sheet-overlay {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: var(--overlay);
}

.provision-sheet {
  width: 520px;
  height: 100%;
  border-left: 1px solid var(--border);
  background: var(--background-tier-1);
}

.import-sheet {
  width: 580px;
}

.provision-sheet > form {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.sheet-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}

.sheet-heading h2 {
  margin-bottom: 5px;
  font-size: 18px;
}

.sheet-heading p {
  margin: 0;
  color: var(--secondary-foreground);
  font-size: 12.5px;
}

.icon-button {
  display: grid;
  width: 28px;
  height: 28px;
  flex: none;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--secondary-foreground);
  font-size: 20px;
  line-height: 1;
}

.icon-button:hover {
  background: var(--background-tier-2);
}

.sheet-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 16px;
  overflow: auto;
  padding: 20px 22px;
}

.sheet-body small,
.privilege-checkbox small {
  color: var(--secondary-foreground);
  font-size: 11.5px;
  font-weight: 400;
}

.sheet-body fieldset {
  margin: 0;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.sheet-body legend {
  margin-bottom: 12px;
  color: var(--secondary-foreground);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sheet-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.range-access-grid-sheet {
  max-height: 430px;
  overflow: auto;
}

.import-contract {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background);
}

.import-contract > strong {
  font-size: 13px;
  font-weight: 500;
}

.import-contract p {
  margin: 0;
  color: var(--secondary-foreground);
  font-size: 12px;
  line-height: 1.5;
}

.import-contract code {
  overflow-wrap: anywhere;
  color: var(--foreground);
  font-size: 11px;
}

.import-contract .button {
  justify-self: start;
}

.privilege-checkbox {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 10px !important;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.privilege-checkbox input {
  width: 16px;
  height: 16px;
  flex: none;
  margin: 1px 0 0;
}

.privilege-checkbox span {
  display: grid;
  gap: 2px;
}

.privilege-checkbox strong {
  font-size: 12.5px;
  font-weight: 500;
}

.sheet-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--border);
  background: var(--background-tier-1);
}

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