:root {
  color-scheme: light;
  --bg: #f3f4f6;
  --bg-2: #fafafa;
  --nav: #111111;
  --nav-2: #262626;
  --nav-3: #404040;
  --surface: #ffffff;
  --surface-2: #f5f5f5;
  --surface-3: #eeeeee;
  --line: #e5e5e5;
  --line-strong: #c7c7c7;
  --text: #111111;
  --text-2: #3f3f46;
  --muted: #737373;
  --accent: #111111;
  --accent-2: #404040;
  --accent-3: #737373;
  --violet: #5b4cc4;
  --violet-soft: #eeebff;
  --violet-line: #d8d2ff;
  --tone-strong: #111111;
  --tone-mid: #525252;
  --tone-danger: #262626;
  --tone-dark: #171717;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --success-text: #047857;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --warning-text: #b45309;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --danger-text: #b91c1c;
  --info-bg: #eff6ff;
  --info-border: #bfdbfe;
  --info-text: #1d4ed8;
  --neutral-bg: #f8fafc;
  --neutral-border: #cbd5e1;
  --neutral-text: #475569;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --focus: 0 0 0 3px rgba(0, 0, 0, 0.16);
  --workspace-tabs-height: 46px;
}

.startup-splash-ai-layout {
  grid-template-columns: minmax(0, 1fr);
}

.startup-splash-ai-card {
  min-width: 0;
}

.startup-splash-ai-section-head,
.startup-splash-ai-savebar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.startup-splash-ai-section-head p,
.startup-splash-ai-helper,
.startup-splash-ai-savebar span,
.startup-splash-ai-field > small {
  color: var(--muted);
  line-height: 1.65;
}

.startup-splash-ai-section-head p {
  max-width: 880px;
  margin: 7px 0 0;
}

.startup-splash-ai-section-head .status-chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  padding: 5px 10px;
  color: var(--text-2);
  white-space: nowrap;
}

.startup-splash-ai-term-tools {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(240px, 1.4fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 20px;
}

.startup-splash-ai-term-tools .field {
  margin: 0;
}

.startup-splash-ai-term-tools input,
.startup-splash-ai-term-row input,
.startup-splash-ai-field textarea {
  width: 100%;
}

.startup-splash-ai-helper {
  margin: 12px 0;
}

.startup-splash-ai-term-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 520px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.startup-splash-ai-term-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 8px;
}

.startup-splash-ai-term-row[hidden] {
  display: none;
}

.startup-splash-ai-term-count {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.startup-splash-ai-prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.startup-splash-ai-field {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.startup-splash-ai-field.is-wide {
  grid-column: 1 / -1;
}

.startup-splash-ai-field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.startup-splash-ai-field-label small {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.startup-splash-ai-field textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.55;
}

.startup-splash-ai-field textarea[readonly],
.startup-splash-ai-term-row input[readonly] {
  background: var(--surface-2);
  color: var(--text-2);
}

.startup-splash-ai-savebar {
  position: sticky;
  z-index: 3;
  bottom: 14px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  backdrop-filter: blur(12px);
}

.startup-splash-ai-savebar > div {
  display: grid;
  gap: 4px;
}

.startup-splash-ai-notice {
  border: 1px solid var(--info-border);
  border-radius: 8px;
  background: var(--info-bg);
  color: var(--info-text);
  padding: 12px 14px;
}

.startup-splash-ai-notice.success {
  border-color: var(--success-border);
  background: var(--success-bg);
  color: var(--success-text);
}

.startup-splash-ai-notice.danger {
  border-color: var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger-text);
}

@media (max-width: 900px) {
  .startup-splash-ai-term-list,
  .startup-splash-ai-prompt-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .startup-splash-ai-field.is-wide {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .startup-splash-ai-section-head,
  .startup-splash-ai-savebar {
    align-items: stretch;
    flex-direction: column;
  }

  .startup-splash-ai-term-tools {
    grid-template-columns: minmax(0, 1fr);
  }

  .startup-splash-ai-term-tools button,
  .startup-splash-ai-savebar button {
    width: 100%;
  }

  .startup-splash-ai-term-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .startup-splash-ai-term-row button {
    grid-column: 1 / -1;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(0, 0, 0, 0.028) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 0 10px;
  cursor: pointer;
}

button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 0;
  box-shadow: var(--focus);
}

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

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

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

.gateway-shell {
  min-height: 100vh;
  height: 100vh;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
}

/* Login styles are defined at the end of this file to keep auth-page overrides scoped. */

.gateway-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 680px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: 0 14px 14px;
  overflow: visible;
  border-right: 1px solid var(--line);
  background: #ffffff;
  color: var(--text-2);
}

.sidebar-profile {
  position: relative;
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.profile-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.profile-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f1f1f1;
  color: var(--accent);
  font-weight: 950;
}

.profile-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.profile-copy strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
}

.profile-copy span,
.profile-email,
.profile-field span,
.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.profile-toggle {
  width: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
}

.profile-toggle:hover {
  background: var(--surface-2);
  color: var(--text);
}

.profile-menu {
  position: absolute;
  z-index: 20;
  top: 70px;
  right: 0;
  width: 250px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.profile-email {
  padding: 8px;
}

.profile-field {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.role-select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 0 10px;
}

.profile-menu button {
  width: 100%;
  border-color: transparent;
  background: transparent;
  color: var(--text-2);
  text-align: left;
}

.profile-menu button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.gateway-menu {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #b8b8b8 transparent;
  display: grid;
  gap: 2px;
  align-content: start;
  padding: 6px 10px 6px 0;
}

.gateway-menu::-webkit-scrollbar {
  width: 10px;
}

.gateway-menu::-webkit-scrollbar-track {
  background: transparent;
}

.gateway-menu::-webkit-scrollbar-thumb {
  min-height: 56px;
  border: 3px solid transparent;
  border-radius: 999px;
  background: #b8b8b8;
  background-clip: padding-box;
}

.gateway-menu::-webkit-scrollbar-thumb:hover {
  background: #9f9f9f;
  background-clip: padding-box;
}

.menu-group {
  display: grid;
  gap: 0;
  width: calc(100% - 8px);
}

.menu-group-toggle,
.footer-nav-button {
  width: 100%;
  min-height: 34px;
  display: grid;
  gap: 7px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  border-color: transparent;
  background: transparent;
  color: var(--text-2);
  padding: 0 9px;
  text-align: left;
}

.menu-group-toggle {
  grid-template-columns: 26px minmax(0, 1fr) 16px;
  cursor: pointer;
}

.footer-nav-button {
  grid-template-columns: 26px minmax(0, 1fr);
}

.footer-nav-button {
  cursor: pointer;
}

.menu-group-toggle:hover,
.footer-nav-button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.menu-button {
  position: relative;
  width: calc(100% - 8px);
  min-height: 30px;
  border-color: transparent;
  background: transparent;
  color: var(--text-2);
  text-align: left;
  padding: 0 7px 0 11px;
}

.menu-button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.menu-group-toggle.is-active,
.menu-button.is-active,
.footer-nav-button.is-active {
  background: #f1f1f1;
  border-color: transparent;
  color: var(--text);
}

.menu-button.is-active,
.footer-nav-button.is-active {
  background: var(--text);
  border-color: var(--text);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.menu-button.is-active .menu-label,
.footer-nav-button.is-active span:last-child {
  color: #ffffff;
}

.menu-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #f5f5f5;
  color: var(--muted);
}

.menu-group-toggle.is-active .menu-icon,
.footer-nav-button.is-active .menu-icon {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.footer-nav-button.is-active .menu-icon {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--text);
}

.menu-line-icon {
  width: 16px;
  height: 16px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-group-toggle .chevron {
  width: 16px;
  height: 16px;
  justify-self: end;
  color: var(--muted);
}

.menu-group-toggle.is-active .chevron {
  color: var(--text);
}

.menu-group-label,
.footer-nav-button span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.menu-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron {
  width: 18px;
  height: 18px;
  transition:
    transform 180ms cubic-bezier(0.4, 0, 0.2, 1),
    color 140ms ease;
}

.chevron.is-open {
  transform: rotate(180deg);
}

.submenu-list {
  display: grid;
  gap: 1px;
  max-height: none;
  overflow: visible;
  margin: 1px 0 5px 20px;
  padding: 1px 0 1px 14px;
  border-left: 1px solid var(--line);
  list-style: none;
  opacity: 1;
  transform: translateY(0);
  transform-origin: top;
  transition:
    max-height 220ms cubic-bezier(0.4, 0, 0.2, 1),
    margin 220ms cubic-bezier(0.4, 0, 0.2, 1),
    padding 220ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 150ms ease,
    transform 220ms cubic-bezier(0.4, 0, 0.2, 1),
    border-color 150ms ease;
}

.menu-group.is-collapsed .submenu-list {
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
  margin-bottom: 2px;
  padding-top: 0;
  padding-bottom: 0;
  border-color: transparent;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

.menu-group.is-collapsing .submenu-list {
  overflow: hidden;
  pointer-events: none;
}

.sidebar-footer {
  display: grid;
  gap: 2px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.gateway-main {
  min-width: 0;
  min-height: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow-y: auto;
  overscroll-behavior: contain;
  isolation: isolate;
}

.workspace-tabs {
  position: sticky;
  top: 0;
  z-index: 60;
  min-width: 0;
  height: var(--workspace-tabs-height);
  min-height: var(--workspace-tabs-height);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 6px 14px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(17, 17, 17, 0.04);
}

.workspace-tabs-scroll {
  min-width: 0;
  display: flex;
  gap: 6px;
  align-items: center;
  overflow: hidden;
}

.workspace-tab {
  flex: 0 0 auto;
  max-width: 172px;
  min-height: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.workspace-tab.is-active {
  border-color: #d8d8d8;
  background: #f4f4f4;
  color: var(--text);
  box-shadow: none;
}

.workspace-tab-main {
  min-width: 0;
  min-height: 30px;
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0 7px 0 10px;
}

.workspace-tab-main:hover,
.workspace-tab-close:hover {
  border-color: transparent;
  background: var(--surface-2);
  color: var(--text);
}

.workspace-tab.is-active .workspace-tab-main:hover,
.workspace-tab.is-active .workspace-tab-close:hover {
  background: #ededed;
  color: var(--text);
}

.workspace-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #737373;
}

.workspace-tab.is-active .workspace-dot {
  background: var(--text);
}

.workspace-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  font-size: 13px;
  font-weight: 850;
}

.workspace-tab-close {
  width: 24px;
  min-height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.workspace-tab-close:disabled {
  visibility: hidden;
}

.page-tabs-menu {
  position: relative;
}

.page-menu-button {
  min-height: 32px;
  display: grid;
  grid-template-columns: auto auto 16px;
  gap: 7px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.05);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.page-menu-button:hover {
  border-color: var(--text);
  background: var(--surface-2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.page-menu-count {
  min-width: 24px;
  min-height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--text);
  color: #ffffff;
  font-weight: 950;
}

.page-tabs-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  width: 244px;
  max-height: 360px;
  overflow: auto;
  display: grid;
  gap: 3px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.14);
}

.page-tabs-popover button {
  width: 100%;
  min-height: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  padding: 0 10px;
  text-align: left;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.page-tabs-popover button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.page-tabs-popover button.is-active {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: inset 3px 0 0 var(--text);
}

.page-tabs-popover small {
  color: inherit;
  opacity: 0.72;
  font-size: 11px;
}

.gateway-header {
  position: sticky;
  top: var(--workspace-tabs-height);
  z-index: 50;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 20px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(17, 17, 17, 0.04);
}

.header-copy {
  min-width: 0;
  display: grid;
}

.header-copy h1 {
  font-size: 21px;
  line-height: 1.2;
}

.header-actions,
.button-row,
.status-row,
.tab-strip,
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.header-actions {
  position: relative;
}

.gateway-content {
  position: relative;
  z-index: 0;
  min-width: 0;
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 10px;
  padding: 16px 20px 28px;
}

.surface-panel,
.metric-card,
.layout-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card span,
.field > span,
.bulk-caption {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.tag,
.status-pill,
.support-badge,
.status-badge {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 999px;
  padding: 0 7px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.status-badge::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 14%, transparent);
  content: "";
}

.support-badge[data-status="ready"] {
  border-color: var(--success-border);
  background: var(--success-bg);
  color: var(--success-text);
}

.support-badge[data-status="partial"] {
  border-color: var(--warning-border);
  background: var(--warning-bg);
  color: var(--warning-text);
}

.support-badge[data-status="waiting"] {
  border-color: var(--neutral-border);
  background: var(--neutral-bg);
  color: var(--neutral-text);
}

.status-pill[data-tone="dark"] {
  border-color: var(--neutral-border);
  background: var(--neutral-bg);
  color: var(--neutral-text);
}

.status-pill[data-tone="mid"] {
  border-color: var(--info-border);
  background: var(--info-bg);
  color: var(--info-text);
}

.status-pill[data-tone="light"] {
  border-color: var(--neutral-border);
  background: #ffffff;
  color: var(--neutral-text);
}

.status-badge[data-kind="success"] {
  border-color: color-mix(in srgb, var(--success-border) 76%, #ffffff);
  background: color-mix(in srgb, var(--success-bg) 72%, #ffffff);
  color: var(--success-text);
}

.status-badge[data-kind="warning"] {
  border-color: color-mix(in srgb, var(--warning-border) 78%, #ffffff);
  background: color-mix(in srgb, var(--warning-bg) 72%, #ffffff);
  color: var(--warning-text);
}

.status-badge[data-kind="danger"] {
  border-color: color-mix(in srgb, var(--danger-border) 80%, #ffffff);
  background: color-mix(in srgb, var(--danger-bg) 70%, #ffffff);
  color: var(--danger-text);
}

.status-badge[data-kind="info"] {
  border-color: color-mix(in srgb, var(--info-border) 76%, #ffffff);
  background: color-mix(in srgb, var(--info-bg) 72%, #ffffff);
  color: var(--info-text);
}

.status-badge[data-kind="neutral"] {
  border-color: color-mix(in srgb, var(--neutral-border) 80%, #ffffff);
  background: color-mix(in srgb, var(--neutral-bg) 76%, #ffffff);
  color: var(--neutral-text);
}

.tenant-status-switch {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 2px 6px 2px 2px;
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.tenant-status-switch:hover {
  border-color: var(--line);
  background: #ffffff;
  color: var(--text);
}

.tenant-status-switch:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.tenant-status-switch-track {
  width: 30px;
  height: 18px;
  position: relative;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #e8ebef;
  border: 1px solid #d7dce2;
  box-shadow: inset 0 1px 2px rgba(17, 24, 39, 0.08);
  transition: background 160ms ease, border-color 160ms ease;
}

.tenant-status-switch-dot {
  width: 14px;
  height: 14px;
  position: absolute;
  left: 1px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(17, 24, 39, 0.2);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.tenant-status-switch-label {
  min-width: 24px;
  text-align: left;
}

.tenant-status-switch.is-on {
  color: var(--success-text);
}

.tenant-status-switch.is-on .tenant-status-switch-track {
  border-color: color-mix(in srgb, var(--success-text) 28%, #ffffff);
  background: color-mix(in srgb, var(--success-text) 78%, #ffffff);
}

.tenant-status-switch.is-on .tenant-status-switch-dot {
  transform: translateX(12px);
  background: #ffffff;
}

.tenant-status-switch.is-off {
  color: #7b818a;
}

.tenant-status-switch.is-off .tenant-status-switch-track {
  border-color: #dde1e7;
  background: #f1f3f5;
}

.tenant-status-switch.is-off .tenant-status-switch-dot {
  background: #d94a4a;
  box-shadow: 0 1px 4px rgba(217, 74, 74, 0.2);
}

.tenant-status-switch.is-blocked .tenant-status-switch-track {
  border-color: color-mix(in srgb, var(--danger-text) 24%, #ffffff);
}

.metric-grid {
  height: 96px;
  min-height: 96px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 96px;
  align-items: start;
  align-content: start;
  gap: 10px;
  overflow: hidden;
}

.metric-grid.metric-grid-placeholder {
  display: none;
  pointer-events: none;
  visibility: hidden;
}

.metric-grid.review-simulation-metric-grid {
  height: 202px;
  min-height: 202px;
  overflow: visible;
}

.metric-card {
  position: relative;
  height: 96px;
  min-height: 96px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  overflow: hidden;
}

.metric-card strong {
  font-size: 24px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.metric-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.metric-card .module-info {
  position: absolute;
  top: 10px;
  right: 10px;
}

.surface-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.workbench-panel {
  align-content: start;
  gap: 8px;
}

.workbench-controls {
  min-width: 0;
  min-height: 46px;
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: end;
}

.workbench-controls.without-tabs {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.workbench-controls:not(.without-tabs) {
  align-items: center;
}

.workbench-controls.without-tabs .panel-actions {
  justify-self: end;
  align-self: end;
}

.workbench-controls:not(.without-tabs) .panel-actions {
  align-self: center;
}

.workbench-filters {
  min-width: 0;
  min-height: 46px;
  align-self: end;
}

.workbench-filters .filter-grid {
  min-height: 46px;
  padding: 0;
}

.workbench-tabs {
  min-width: 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.workbench-tabs:empty {
  display: none;
}

.panel-heading {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.panel-heading h3 {
  font-size: 16px;
  line-height: 1.3;
}

.panel-heading p {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
}

.panel-actions {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.action-row {
  padding-left: 8px;
  border-left: 1px solid var(--line);
}

.tab-strip {
  position: relative;
  width: fit-content;
  max-width: 100%;
  min-height: 38px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(17, 17, 17, 0.11);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.86) inset,
    0 8px 24px rgba(17, 17, 17, 0.04);
  backdrop-filter: blur(12px);
  overflow-x: auto;
  scrollbar-width: none;
  --tab-cursor-left: 0px;
  --tab-cursor-width: 0px;
  --tab-cursor-opacity: 0;
}

.tab-strip::-webkit-scrollbar {
  display: none;
}

.tab-cursor {
  position: absolute;
  top: 4px;
  left: 0;
  z-index: 0;
  width: var(--tab-cursor-width);
  height: calc(100% - 8px);
  border-radius: 8px;
  background: rgba(17, 17, 17, 0.06);
  opacity: var(--tab-cursor-opacity);
  transform: translateX(var(--tab-cursor-left));
  transition:
    transform 170ms ease,
    width 170ms ease,
    opacity 120ms ease;
  pointer-events: none;
}

.tab-button {
  position: relative;
  z-index: 1;
  min-height: 34px;
  border-color: transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 0 16px;
  font-size: 15px;
  font-weight: 780;
  white-space: nowrap;
  transition:
    background-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.tab-button::after {
  content: none;
}

.tab-button.is-active {
  color: var(--text);
  background: rgba(17, 17, 17, 0.08);
  font-weight: 860;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.86) inset,
    0 6px 16px rgba(17, 17, 17, 0.05);
}

.tab-button.is-active::after,
.tab-button:hover:not(:disabled)::after {
  content: none;
}

.tab-strip .tab-button:hover:not(:disabled) {
  border-color: transparent;
  background: rgba(17, 17, 17, 0.05);
  color: var(--text);
}

.tab-button:focus-visible {
  border-color: transparent;
  box-shadow:
    inset 0 0 0 1px var(--text),
    0 0 0 3px rgba(17, 17, 17, 0.08);
}

#gateway-tab-content {
  position: relative;
  z-index: 1;
  min-height: 260px;
  display: grid;
  align-content: start;
  gap: 10px;
}

#gateway-tab-content.is-tab-entering {
  animation: tabContentFadeSlide 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes tabContentFadeSlide {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tab-cursor,
  .tab-button,
  .tab-button::after,
  .drawer,
  .floating-long-text-popover,
  .skeleton-line,
  .skeleton-action,
  .skeleton-checkbox,
  .pulsating-loader span,
  #gateway-tab-content.is-tab-entering {
    animation: none;
    transition: none;
  }
}

.result-region {
  min-height: 220px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.layout-board {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.layout-board.is-loading-layout {
  min-height: 360px;
}

.layout-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 12px;
}

.is-loading-layout .layout-card {
  min-height: 174px;
}

.is-loading-layout .layout-card.full-span,
.is-loading-layout .table-card {
  min-height: 222px;
}

.data-inline-loader {
  min-height: 94px;
  width: 100%;
  display: grid;
  place-items: center;
}

.data-wrap.is-loading {
  min-height: 156px;
  display: grid;
  overflow: hidden;
}

.table-skeleton-wrap {
  display: block;
  min-height: 220px;
}

.table-skeleton-wrap .data-inline-loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  min-height: 100%;
  background: rgba(255, 255, 255, 0.6);
  pointer-events: none;
}

.table-skeleton {
  opacity: 0.92;
}

.skeleton-line,
.skeleton-action,
.skeleton-checkbox {
  display: block;
  max-width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 45%, #e6edf5 100%);
  background-size: 180% 100%;
  animation: skeletonShimmer 1.35s ease-in-out infinite;
}

.skeleton-line {
  width: 76%;
  height: 12px;
}

.skeleton-line-1 {
  width: 54%;
}

.skeleton-line-2 {
  width: 86%;
}

.skeleton-line-3 {
  width: 42%;
}

.skeleton-action {
  width: 58px;
  height: 24px;
  border-radius: 6px;
}

.skeleton-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

@keyframes skeletonShimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.record-list .data-inline-loader,
.priority-list .data-inline-loader,
.tool-list .data-inline-loader,
.summary-stack .data-inline-loader,
.matrix-grid .data-inline-loader,
.entity-card-grid .data-inline-loader,
.server-card-grid .data-inline-loader {
  min-height: 112px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
}

.chart-card > .data-inline-loader,
.review-detail > .data-inline-loader,
.tool-workspace > .data-inline-loader,
.command-health > .data-inline-loader {
  min-height: 150px;
}

.pulsating-loader {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pulsating-loader span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #111111;
  opacity: 0.52;
  animation: pulsatingLoaderDot 1s ease-in-out infinite;
}

.pulsating-loader span:nth-child(2) {
  animation-delay: 0.3s;
}

.pulsating-loader span:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes pulsatingLoaderDot {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.5);
  }
}

.layout-card.full-span,
.full-span {
  grid-column: 1 / -1;
}

.layout-card-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.layout-card-head h3 {
  font-size: 14px;
  line-height: 1.3;
}

.layout-card-head > span,
.layout-head-meta {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.layout-head-tools,
.entity-tools,
.profile-tools,
.server-tools {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.module-info {
  position: relative;
  z-index: 6;
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  cursor: help;
}

.module-info svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.module-info:hover,
.module-info:focus-visible {
  border-color: var(--violet);
  color: var(--violet);
}

.module-popover {
  position: fixed;
  top: var(--popover-top, 0);
  left: var(--popover-left, 0);
  z-index: 80;
  width: var(--popover-width, min(430px, calc(100vw - 24px)));
  max-height: var(--popover-max-height, min(460px, calc(100vh - 24px)));
  display: grid;
  visibility: hidden;
  opacity: 0;
  overflow: auto;
  overscroll-behavior: contain;
  transform: translateY(var(--popover-hidden-offset, 4px));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  text-align: left;
  pointer-events: none;
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    visibility 140ms ease;
  scrollbar-width: thin;
  scrollbar-color: #d4d4d4 transparent;
}

.module-info > .module-popover {
  display: none;
}

.floating-module-popover {
  position: fixed;
  top: var(--popover-top, 0);
  left: var(--popover-left, 0);
  z-index: 300;
  width: var(--popover-width, min(430px, calc(100vw - 24px)));
  max-height: var(--popover-max-height, min(460px, calc(100vh - 24px)));
  display: grid;
  visibility: hidden;
  opacity: 0;
  overflow: auto;
  overscroll-behavior: contain;
  transform: translateY(var(--popover-hidden-offset, 4px));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  text-align: left;
  pointer-events: none;
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    visibility 140ms ease;
  scrollbar-width: thin;
  scrollbar-color: #d4d4d4 transparent;
}

.floating-module-popover.is-visible {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.module-popover::-webkit-scrollbar,
.floating-module-popover::-webkit-scrollbar {
  width: 8px;
}

.module-popover::-webkit-scrollbar-track,
.floating-module-popover::-webkit-scrollbar-track {
  background: transparent;
}

.module-popover::-webkit-scrollbar-thumb,
.floating-module-popover::-webkit-scrollbar-thumb {
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #d4d4d4;
}

.module-popover[data-placement="top"],
.floating-module-popover[data-placement="top"] {
  --popover-hidden-offset: -4px;
}

.module-info.is-popover-ready:hover .module-popover,
.module-info.is-popover-ready:focus .module-popover,
.module-info.is-popover-ready:focus-visible .module-popover,
.module-info.is-popover-ready:focus-within .module-popover {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.module-popover::before {
  content: "";
  position: absolute;
  top: -6px;
  left: var(--popover-arrow-left, calc(100% - 22px));
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #ffffff;
  transform: rotate(45deg);
}

.floating-module-popover::before {
  content: "";
  position: absolute;
  top: -6px;
  left: var(--popover-arrow-left, calc(100% - 22px));
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #ffffff;
  transform: rotate(45deg);
}

.module-popover[data-placement="top"]::before,
.floating-module-popover[data-placement="top"]::before {
  top: auto;
  bottom: -6px;
  border-top: 0;
  border-left: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.module-popover strong,
.floating-module-popover strong {
  font-size: 13px;
  font-weight: 900;
}

.module-popover > span,
.module-popover li,
.floating-module-popover > span,
.floating-module-popover li {
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.55;
}

.module-popover em,
.floating-module-popover em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.module-popover ul,
.floating-module-popover ul {
  display: grid;
  gap: 5px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.module-popover li b,
.floating-module-popover li b {
  margin-right: 4px;
  color: var(--text);
  font-weight: 850;
}

.command-layout,
.timeline-layout,
.matrix-layout,
.analytics-layout {
  grid-template-columns: minmax(0, 1.48fr) minmax(320px, 0.72fr);
}

.operation-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.accounts-layout {
  grid-template-columns: minmax(300px, 0.48fr) minmax(0, 1.52fr);
  align-items: stretch;
}

.tenant-admin-accounts-layout {
  grid-template-columns: minmax(560px, 1.35fr) minmax(340px, 0.85fr);
  align-items: start;
}

.tenant-admin-list-panel,
.tenant-admin-detail-panel {
  min-width: 0;
  min-height: 460px;
}

.tenant-admin-access-note {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid #d9d9d9;
  border-left: 3px solid #111111;
  border-radius: 6px;
  background: #f7f7f7;
  color: var(--text-2);
  font-size: 12px;
}

.tenant-admin-access-note strong {
  flex: 0 0 auto;
  color: var(--text);
}

.tenant-admin-account-table {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.tenant-admin-account-table-head,
.tenant-admin-account-row {
  min-width: 0;
  display: grid;
  grid-template-columns:
    minmax(110px, 1.2fr)
    minmax(112px, 1.08fr)
    minmax(72px, 0.72fr)
    minmax(62px, 0.58fr)
    minmax(92px, 0.8fr)
    minmax(108px, 0.94fr);
  gap: 8px;
  align-items: center;
}

.tenant-admin-account-table-head {
  min-height: 36px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  background: #f5f5f5;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.tenant-admin-account-list {
  max-height: min(590px, calc(100vh - 322px));
  overflow: auto;
  overscroll-behavior: contain;
}

.tenant-admin-account-row {
  position: relative;
  min-height: 58px;
  padding: 8px 10px;
  border-bottom: 1px solid #ececec;
  background: #ffffff;
  cursor: pointer;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.tenant-admin-account-row:last-child {
  border-bottom: 0;
}

.tenant-admin-account-row:hover,
.tenant-admin-account-row:focus-visible {
  background: #f8f8f8;
  outline: none;
}

.tenant-admin-account-row.is-selected {
  background: #f1f1f1;
  box-shadow: inset 3px 0 0 #111111;
}

.tenant-admin-account-cell {
  min-width: 0;
  display: grid;
  gap: 3px;
  align-items: center;
}

.tenant-admin-account-cell strong,
.tenant-admin-account-cell small {
  min-width: 0;
  overflow: hidden;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-admin-account-cell.is-account strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.tenant-admin-account-cell small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.tenant-admin-account-cell .status-badge {
  width: fit-content;
  max-width: 100%;
}

.tenant-admin-empty-state {
  min-height: 320px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.tenant-admin-empty-state strong {
  color: var(--text);
  font-size: 15px;
}

.tenant-admin-empty-state span {
  max-width: 360px;
  font-size: 12px;
  line-height: 1.6;
}

.tenant-admin-empty-state button {
  margin-top: 4px;
}

.tenant-admin-empty-state.is-detail {
  min-height: 350px;
}

.tenant-admin-selection-notice {
  margin-bottom: 12px;
  padding: 8px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #f7f7f7;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.5;
}

.tenant-admin-detail-body {
  min-width: 0;
}

.tenant-admin-detail-section {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.tenant-admin-detail-section .inline-section-head {
  min-width: 0;
}

.tenant-admin-detail-section .inline-section-head span {
  min-width: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-admin-security-actions {
  justify-content: flex-start;
  padding-top: 2px;
}

.google-auth-layout {
  grid-template-columns: minmax(320px, 1fr) minmax(300px, 0.82fr);
  align-items: stretch;
}

.google-auth-card-wide {
  grid-column: 1 / -1;
}

.master-detail-layout,
.editor-layout,
.tool-layout {
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.72fr);
}

.review-layout {
  grid-template-columns: minmax(280px, 0.62fr) minmax(0, 1.1fr) minmax(310px, 0.62fr);
}

.editor-layout {
  grid-template-columns: minmax(300px, 0.66fr) minmax(0, 1fr) minmax(280px, 0.58fr);
}

.cards-layout {
  grid-template-columns: 1fr;
}

.resource-pool-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(17, 17, 17, 0.045), transparent 38%),
    #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.resource-pool-guide article {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid #e8e8e8;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.76);
}

.resource-pool-guide strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.resource-pool-guide span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.resource-pool-guide button {
  align-self: center;
  min-width: 132px;
  min-height: 38px;
}

.record-panel,
.review-queue,
.review-detail,
.timeline-panel,
.matrix-panel,
.tool-workspace,
.chart-card {
  min-height: 260px;
}

.record-list,
.priority-list,
.audit-timeline,
.tool-list,
.meter-stack,
.bar-stack,
.summary-stack,
.editor-fields {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.record-item,
.priority-item,
.audit-event,
.entity-card,
.matrix-cell,
.summary-row {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.record-item {
  display: grid;
  grid-template-columns: auto 34px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 9px;
  transition:
    border-color 140ms ease,
    background-color 140ms ease,
    box-shadow 140ms ease;
}

.user-record-item {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  cursor: pointer;
}

.user-record-item:hover,
.user-record-item:focus-visible {
  border-color: var(--line-strong);
  background: #fafafa;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  outline: none;
}

.user-record-item.is-selected {
  border-color: var(--text);
  background: #ffffff;
  box-shadow:
    inset 3px 0 0 var(--text),
    0 12px 28px rgba(15, 23, 42, 0.08);
}

.record-item.is-compact {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.record-item.is-compact .avatar-token {
  display: none;
}

.review-record-list {
  gap: 8px;
}

.review-record-item {
  cursor: pointer;
}

.review-record-item:hover,
.review-record-item:focus-visible {
  border-color: var(--line-strong);
  background: #fafafa;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  outline: none;
}

.review-record-item.is-selected {
  background: #ffffff;
}

.review-select-dot {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  border: 1.5px solid #9ca3af;
  border-radius: 999px;
  background: #ffffff;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.review-select-dot::after {
  width: 6px;
  height: 6px;
  content: "";
  border-radius: inherit;
  background: transparent;
  transition: background-color 140ms ease, transform 140ms ease;
  transform: scale(0.5);
}

.review-record-item.is-selected .review-select-dot {
  border-color: var(--text);
  background: var(--text);
  box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.08);
}

.review-record-item.is-selected .review-select-dot::after {
  background: #ffffff;
  transform: scale(1);
}

.registration-layout {
  grid-template-columns: minmax(260px, 0.62fr) minmax(0, 1.38fr);
  align-items: stretch;
}

.registration-list,
.registration-config-card {
  min-height: 360px;
}

.registration-record-list {
  gap: 8px;
}

.registration-record-item {
  grid-template-columns: 18px 34px minmax(0, 1fr) auto;
  cursor: pointer;
}

.registration-record-item .record-meta {
  justify-self: end;
}

.registration-record-item:hover,
.registration-record-item:focus-visible {
  border-color: var(--line-strong);
  background: #fafafa;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  outline: none;
}

.registration-record-item.is-selected {
  background: #ffffff;
}

.registration-record-item.is-selected .review-select-dot {
  border-color: var(--text);
  background: var(--text);
  box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.08);
}

.registration-record-item.is-selected .review-select-dot::after {
  background: #ffffff;
  transform: scale(1);
}

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

.registration-current > div,
.registration-impact-list article {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f7f7;
}

.registration-current span,
.registration-impact-list span {
  color: var(--muted);
  font-size: 12px;
}

.registration-current strong,
.registration-impact-list strong {
  color: var(--text);
  font-size: 14px;
}

.registration-code-field small {
  min-height: 16px;
  color: #dc2626;
  font-size: 12px;
}

.registration-code-field[data-invalid="true"] input {
  border-color: rgba(220, 38, 38, 0.7);
  background: rgba(254, 242, 242, 0.8);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.registration-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.registration-actions {
  margin-top: 2px;
}

.registration-impact-list {
  display: grid;
  gap: 10px;
}

.registration-impact-list.is-inline {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.record-item.is-selected,
.entity-card.is-selected {
  border-color: var(--text);
  box-shadow: inset 3px 0 0 var(--text);
}

.record-item.user-record-item.is-selected {
  border-color: var(--text);
  background: #ffffff;
  box-shadow:
    inset 3px 0 0 var(--text),
    0 12px 28px rgba(15, 23, 42, 0.08);
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.pagination-summary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-controls button,
.pagination-ellipsis {
  min-width: 30px;
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.pagination-controls button:not(:disabled) {
  cursor: pointer;
}

.pagination-controls button:hover:not(:disabled),
.pagination-controls button:focus-visible:not(:disabled) {
  border-color: var(--line-strong);
  background: #f7f7f7;
  outline: none;
}

.pagination-controls button.is-active {
  border-color: var(--text);
  background: var(--text);
  color: #ffffff;
}

.pagination-controls button:disabled {
  cursor: not-allowed;
  color: var(--muted);
  opacity: 0.45;
}

.pagination-ellipsis {
  min-width: 18px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.record-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.record-main strong,
.entity-card strong,
.priority-item strong,
.audit-event-body strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-main span,
.entity-card p,
.priority-item p,
.audit-event-body p,
.detail-pair span,
.meter-row span,
.profile-head span,
.review-title span,
.device-preview p,
.entity-foot span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.record-meta,
.entity-card-head,
.entity-foot,
.review-title,
.audit-event-body > div,
.audit-event-body footer,
.profile-head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.record-meta {
  justify-content: flex-end;
}

.editor-workbench-layout {
  align-items: stretch;
}

.editor-list-panel,
.editor-card,
.preview-card {
  min-height: 360px;
}

.editor-record-list {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.editor-record-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.editor-record-item:hover,
.editor-record-item:focus-visible {
  border-color: var(--line-strong);
  background: #fbfbfb;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  outline: none;
  transform: translateY(-1px);
}

.editor-record-item.is-selected {
  border-color: var(--text);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.editor-record-item.is-selected .review-select-dot {
  border-color: var(--text);
  background: var(--text);
  box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.08);
}

.editor-record-item.is-selected .review-select-dot::after {
  background: #ffffff;
  transform: scale(1);
}

.editor-record-item .record-main strong,
.editor-record-item .record-main span {
  white-space: normal;
}

.editor-record-item .record-meta {
  justify-content: flex-end;
}

.editor-form-grid,
.edit-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

.editor-form-grid .field textarea,
.edit-form-grid .field textarea {
  min-height: 110px;
}

.enterprise-license-readonly {
  display: grid;
  gap: 8px;
}

.enterprise-license-readonly-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.enterprise-license-readonly-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.enterprise-license-readonly-title strong,
.enterprise-license-readonly-title span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-license-readonly-title span {
  color: var(--muted);
  font-size: 12px;
}

.enterprise-license-unbind-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.enterprise-license-preview {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(120px, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.enterprise-license-preview span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-license-preview strong,
.enterprise-license-preview b {
  color: var(--text);
  font-weight: 700;
}

.field-warning {
  color: var(--danger-text);
}

.editor-field-wide {
  grid-column: 1 / -1;
}

.tenant-admin-create-form,
.tenant-admin-create-result {
  display: grid;
  gap: 14px;
}

.tenant-admin-create-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 247, 247, 0.92)),
    radial-gradient(circle at 12% 0%, rgba(0, 0, 0, 0.05), transparent 35%);
}

.tenant-admin-create-hero div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.tenant-admin-create-hero strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.tenant-admin-create-hero small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.tenant-admin-create-grid {
  gap: 12px 14px;
}

.password-mode-field {
  align-content: start;
}

.tenant-admin-password-option {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.tenant-admin-password-option:hover,
.tenant-admin-password-option:focus-within {
  border-color: #111111;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}

.tenant-admin-password-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tenant-admin-password-radio {
  width: 18px;
  height: 18px;
  border: 1px solid #c9cdd3;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 0 0 4px #ffffff;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.tenant-admin-password-option input:checked + .tenant-admin-password-radio {
  border-color: #111111;
  background: #111111;
  box-shadow: inset 0 0 0 5px #ffffff;
}

.tenant-admin-password-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.tenant-admin-password-copy strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.tenant-admin-password-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.generated-password-card {
  display: none;
  grid-column: 1 / -1;
  gap: 8px;
  padding: 13px 14px;
  border: 1px solid #cdcdcd;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(245, 245, 245, 0.98)),
    radial-gradient(circle at 100% 0%, rgba(0, 0, 0, 0.055), transparent 36%);
}

.tenant-admin-create-form.is-system-password .generated-password-card,
.generated-password-card.is-result {
  display: grid;
}

.tenant-admin-create-form.is-system-password .tenant-admin-manual-password {
  display: none;
}

.tenant-admin-create-form:not(.is-system-password) .generated-password-card {
  display: none;
}

.generated-password-card > span {
  color: var(--muted);
  font-size: 12px;
}

.generated-password-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 7px 8px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.generated-password-card code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.generated-password-card button {
  flex: 0 0 auto;
  min-height: 30px;
  padding-inline: 10px;
}

.generated-password-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.editor-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
}

.editor-preview {
  min-height: 248px;
  align-content: start;
}

.editor-preview-head,
.editor-preview-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.editor-preview-head span,
.editor-preview-foot span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.editor-preview-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.record-meta button,
.entity-foot button,
.audit-event-body button {
  min-height: 26px;
  padding: 0 8px;
  font-size: 12px;
}

.avatar-token {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #f0f0f0;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.avatar-token.is-large {
  width: 52px;
  height: 52px;
  font-size: 15px;
}

.tenant-logo {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.tenant-logo-sm {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  font-size: 11px;
}

.tenant-logo-lg {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  font-size: 16px;
}

.tenant-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.tenant-logo.is-unsafe {
  background: #fff7ed;
  border-color: rgba(234, 88, 12, 0.32);
  color: #9a3412;
}

.tenant-logo-summary {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.tenant-logo-summary > div {
  min-width: 0;
}

.tenant-logo-summary strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
}

.tenant-logo-summary span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.detail-item.is-logo-detail {
  align-content: start;
}

.profile-head {
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.profile-head > div {
  min-width: 0;
  margin-right: auto;
}

.profile-head h3,
.review-title h3 {
  font-size: 16px;
  line-height: 1.25;
}

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

.detail-pair {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

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

.legal-docs-layout {
  gap: 12px;
}

.legal-docs-app-card,
.legal-docs-active-card,
.legal-docs-publish-card {
  overflow: visible;
}

.legal-docs-app-card {
  position: relative;
  z-index: 3;
}

.legal-docs-app-picker {
  display: grid;
  grid-template-columns: minmax(360px, 1.1fr) minmax(260px, 0.72fr) minmax(300px, 0.88fr);
  gap: 12px;
  align-items: stretch;
}

.legal-docs-combobox,
.legal-docs-control-card,
.legal-docs-file-drop,
.legal-docs-app-summary {
  min-width: 0;
  display: grid;
  gap: 8px;
  border-radius: 8px;
}

.legal-docs-combobox,
.legal-docs-app-summary,
.legal-docs-flow {
  padding: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.legal-docs-combobox {
  position: relative;
  align-self: start;
  align-content: start;
}

.legal-docs-combobox.is-open {
  z-index: 260;
}

.legal-docs-combobox span,
.legal-docs-control-card span,
.legal-docs-sync-strip span,
.legal-docs-manifest-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.legal-docs-combo-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.legal-docs-combo-control input,
.legal-docs-control-card select,
.legal-docs-control-card textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #ffffff;
  color: var(--text);
  padding: 9px 10px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.legal-docs-control-card textarea {
  min-height: 104px;
  resize: vertical;
}

.legal-docs-combo-control button {
  min-height: 40px;
  border: 1px solid #111111;
  border-radius: 7px;
  background: #111111;
  color: #ffffff;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
}

.legal-docs-combo-control input:focus,
.legal-docs-control-card select:focus,
.legal-docs-control-card textarea:focus,
.legal-docs-file-drop:focus-within {
  border-color: #111111;
  box-shadow: var(--focus);
}

.legal-docs-combo-control input:disabled,
.legal-docs-control-card select:disabled {
  background: #f4f4f5;
  color: var(--muted);
  cursor: not-allowed;
}

.legal-docs-combo-control button:disabled {
  border-color: var(--line);
  background: #f4f4f5;
  color: var(--muted);
  cursor: not-allowed;
}

.legal-docs-combo-list {
  position: absolute;
  z-index: 260;
  top: calc(100% - 6px);
  left: 12px;
  right: auto;
  box-sizing: border-box;
  width: clamp(calc(100% - 24px), 52vw, 640px);
  max-width: calc(100vw - 64px);
  display: grid;
  gap: 6px;
  max-height: min(280px, calc(100vh - 220px));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.legal-docs-combo-option {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 0.8fr) max-content;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.legal-docs-combo-option:hover,
.legal-docs-combo-option:focus,
.legal-docs-combo-option.is-selected {
  border-color: #111111;
  background: #f5f5f5;
  outline: none;
}

.legal-docs-combo-option strong,
.legal-docs-combo-option span,
.legal-docs-combo-option em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legal-docs-combo-option strong {
  font-size: 13px;
}

.legal-docs-combo-option span,
.legal-docs-combo-option em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.legal-docs-combo-option em {
  justify-self: end;
}

.legal-docs-combo-empty {
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}

.legal-docs-app-summary {
  align-content: start;
  border-color: #d7d7d7;
}

.legal-docs-app-summary.is-selected {
  border-color: #111111;
  background: #111111;
  color: #ffffff;
}

.legal-docs-app-summary span,
.legal-docs-app-summary p {
  margin: 0;
  color: inherit;
  opacity: 0.76;
  font-size: 12px;
  line-height: 1.45;
}

.legal-docs-app-summary strong {
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.25;
}

.legal-docs-app-summary button {
  justify-self: start;
}

.legal-docs-flow {
  align-content: center;
  gap: 8px;
}

.legal-docs-flow-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.legal-docs-flow-step span {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 900;
}

.legal-docs-flow-step strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legal-docs-flow-step small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legal-docs-flow-step.is-active {
  border-color: #111111;
  background: #f3f4f6;
}

.legal-docs-flow-step.is-active span {
  border-color: #111111;
  background: #111111;
  color: #ffffff;
}

.legal-docs-flow-step.is-done {
  border-color: var(--success-border);
  background: var(--success-bg);
}

.legal-docs-flow-step.is-done span {
  border-color: var(--success-border);
  background: #ffffff;
  color: var(--success-text);
}

.legal-docs-active-overview {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(420px, 1.2fr);
  gap: 12px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.legal-docs-active-overview.has-active {
  border-color: var(--success-border);
  background: var(--success-bg);
}

.legal-docs-active-title {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.legal-docs-active-title > span {
  width: 58px;
  height: 58px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #111111;
  color: #ffffff;
  font-size: 11px;
  font-weight: 950;
}

.legal-docs-active-overview.has-active .legal-docs-active-title > span {
  background: var(--success-text);
}

.legal-docs-active-title strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  line-height: 1.3;
}

.legal-docs-active-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.legal-docs-manifest-grid,
.legal-docs-sync-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.legal-docs-manifest-grid article,
.legal-docs-sync-strip article {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.legal-docs-manifest-grid strong,
.legal-docs-sync-strip strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legal-docs-sync-strip {
  grid-template-columns: repeat(4, minmax(120px, 1fr)) minmax(220px, 1.4fr);
}

.legal-docs-sync-strip article.wide {
  min-width: 0;
}

.legal-docs-sync-strip article.has-warning {
  border-color: var(--warning-border);
  background: var(--warning-bg);
}

.legal-docs-sync-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.legal-docs-empty-inline,
.legal-docs-soft-empty {
  min-height: 78px;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 13px;
  text-align: center;
}

.legal-docs-publish-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.84fr) minmax(360px, 1.16fr);
  gap: 14px;
  align-items: stretch;
}

.legal-docs-publish-form {
  min-width: 0;
  display: grid;
  gap: 12px;
  align-content: start;
}

.legal-docs-publish-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.legal-docs-publish-foot span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.legal-docs-file-drop {
  position: relative;
  min-height: 192px;
  place-items: center;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  background: #fbfcfe;
  text-align: center;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.legal-docs-file-drop:hover {
  border-color: #111111;
  background: #ffffff;
}

.legal-docs-file-drop.is-dragging {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: var(--focus), inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}

.legal-docs-file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.legal-docs-file-drop .legal-docs-file-icon {
  width: 54px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: #111111;
  color: #ffffff;
  font-size: 11px;
  font-weight: 950;
}

.legal-docs-file-drop strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.3;
}

.legal-docs-file-drop small,
.legal-docs-file-drop em {
  max-width: 100%;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.legal-docs-file-drop.has-file {
  border-color: var(--success-border);
  background: var(--success-bg);
}

.legal-docs-file-drop.has-file em {
  padding: 4px 8px;
  border: 1px solid var(--success-border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--success-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legal-docs-file-drop.has-error {
  border-color: var(--danger-border);
  background: var(--danger-bg);
}

.legal-docs-file-drop b {
  color: var(--danger-text);
  font-size: 12px;
}

.priority-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.priority-rank {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #111111;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.command-health {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.command-trend {
  min-height: 284px;
}

.interactive-line-chart {
  display: grid;
  grid-template-rows: auto minmax(178px, 1fr) auto;
  gap: 8px;
  min-height: 222px;
  color: var(--violet);
  cursor: crosshair;
}

.chart-insight-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  color: var(--text);
}

.chart-insight-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.chart-insight-row strong {
  font-size: 18px;
  line-height: 1;
}

.chart-insight-row em {
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.chart-insight-row em.is-up,
.chart-point-tooltip em.is-up {
  color: var(--success-text);
}

.chart-insight-row em.is-down,
.chart-point-tooltip em.is-down {
  color: var(--danger-text);
}

.line-chart-stage {
  position: relative;
  --active-x: 0%;
  min-height: 178px;
  overflow: visible;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(17, 17, 17, 0.02), rgba(17, 17, 17, 0)),
    var(--surface);
  cursor: crosshair;
}

.line-chart-stage svg {
  width: 100%;
  height: 178px;
  display: block;
  overflow: visible;
}

.chart-grid {
  fill: none;
  stroke: #e6e8ed;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.chart-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.chart-line.is-muted {
  stroke: #a3a3a3;
  stroke-width: 2;
  stroke-dasharray: 5 7;
}

.chart-area {
  fill: rgba(91, 76, 196, 0.12);
}

.line-chart-guide {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: var(--active-x);
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(17, 17, 17, 0.36) 18%, rgba(17, 17, 17, 0.36) 82%, transparent);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-0.5px);
  transition: opacity 120ms ease;
}

.line-chart-stage.is-chart-active .line-chart-guide {
  opacity: 1;
}

.line-chart-points {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.line-chart-dot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 2;
  width: 13px;
  height: 13px;
  min-height: 0;
  padding: 0;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #111111;
  box-shadow: 0 5px 16px rgba(17, 17, 17, 0.22);
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.line-chart-dot::before {
  position: absolute;
  inset: -9px;
  content: "";
  border-radius: inherit;
}

.line-chart-dot:hover,
.line-chart-dot:focus-visible,
.line-chart-dot.is-active {
  border-color: #f8fafc;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.24);
  transform: translate(-50%, -50%) scale(1.22);
  outline: none;
}

.chart-point-tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  z-index: 10;
  min-width: 136px;
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 7px);
  transition: opacity 160ms ease, transform 160ms ease;
  white-space: nowrap;
}

.chart-point-tooltip::after {
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 10px;
  height: 10px;
  content: "";
  border-right: 1px solid #d4d4d8;
  border-bottom: 1px solid #d4d4d8;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}

.chart-point-tooltip b {
  font-size: 12px;
}

.chart-point-tooltip span {
  color: var(--muted);
}

.chart-point-tooltip em {
  font-style: normal;
}

.line-chart-dot:hover .chart-point-tooltip,
.line-chart-dot:focus-visible .chart-point-tooltip,
.line-chart-dot.is-active .chart-point-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.line-chart-dot:first-child .chart-point-tooltip {
  left: 0;
  transform: translate(0, 7px);
}

.line-chart-dot:first-child:hover .chart-point-tooltip,
.line-chart-dot:first-child:focus-visible .chart-point-tooltip,
.line-chart-dot:first-child.is-active .chart-point-tooltip {
  transform: translate(0, 0);
}

.line-chart-dot:first-child .chart-point-tooltip::after {
  left: 12px;
  transform: rotate(45deg);
}

.line-chart-dot:last-child .chart-point-tooltip {
  right: 0;
  left: auto;
  transform: translate(0, 7px);
}

.line-chart-dot:last-child:hover .chart-point-tooltip,
.line-chart-dot:last-child:focus-visible .chart-point-tooltip,
.line-chart-dot:last-child.is-active .chart-point-tooltip {
  transform: translate(0, 0);
}

.line-chart-dot:last-child .chart-point-tooltip::after {
  right: 12px;
  left: auto;
  transform: rotate(45deg);
}

.chart-legend {
  display: flex;
  gap: 14px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 800;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
}

.chart-legend i.muted {
  background: #a8a8a8;
}

.interactive-donut {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.donut-ring {
  position: relative;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
}

.donut-ring svg {
  width: 132px;
  height: 132px;
  overflow: visible;
  transform: rotate(-90deg);
}

.donut-track,
.donut-segment {
  fill: none;
  stroke-width: 14;
}

.donut-track {
  stroke: #ececec;
}

.donut-segment {
  stroke: var(--segment-color);
  stroke-linecap: round;
  transform-origin: 60px 60px;
  transition: stroke-width 180ms ease, filter 180ms ease, opacity 180ms ease;
}

.donut-ring:hover .donut-segment {
  opacity: 0.72;
}

.donut-ring .donut-segment:hover {
  opacity: 1;
  stroke-width: 17;
  filter: drop-shadow(0 5px 8px rgba(17, 17, 17, 0.16));
}

.donut-center {
  position: absolute;
  inset: 34px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #f1f1f1;
}

.donut-center strong {
  font-size: 24px;
  line-height: 1;
}

.donut-center span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.donut-list-item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--segment-color) 12%, transparent) var(--segment-share), transparent 0),
    transparent;
  color: var(--text-2);
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.donut-list-item:hover,
.donut-list-item:focus-visible {
  border-color: color-mix(in srgb, var(--segment-color) 42%, #d4d4d8);
  background-color: #ffffff;
  color: var(--text);
  outline: none;
  transform: translateX(2px);
}

.donut-list-item i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--segment-color);
}

.donut-list-item span {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.donut-list-item strong {
  overflow: hidden;
  color: inherit;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donut-list-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.donut-list-item em {
  color: var(--text);
  font-style: normal;
  font-size: 13px;
  font-weight: 950;
}

.donut-tooltip {
  position: absolute;
  right: 6px;
  bottom: calc(100% + 8px);
  z-index: 12;
  width: min(240px, calc(100vw - 40px));
  padding: 9px 10px;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.donut-tooltip::after {
  position: absolute;
  right: 20px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  content: "";
  border-right: 1px solid #d4d4d8;
  border-bottom: 1px solid #d4d4d8;
  background: inherit;
  transform: rotate(45deg);
}

.donut-list-item:hover .donut-tooltip,
.donut-list-item:focus-visible .donut-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.health-ring-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.health-ring {
  position: relative;
  min-width: 0;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  text-align: center;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.health-ring:hover,
.health-ring:focus-visible {
  border-color: #cfcfcf;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
  outline: none;
  transform: translateY(-1px);
}

.health-ring div {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 56%, transparent 57%),
    conic-gradient(#111111 calc(var(--value) * 1%), #e5e5e5 0);
  transition: transform 160ms ease;
}

.health-ring:hover div,
.health-ring:focus-visible div {
  transform: scale(1.04);
}

.health-ring strong {
  font-size: 16px;
}

.health-ring span {
  color: var(--muted);
  font-size: 12px;
}

.health-ring em {
  max-width: 100%;
  overflow: hidden;
  color: var(--text-2);
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meter-row {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.meter-row > div {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.meter-row strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meter-row i {
  display: block;
  height: 7px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, #111111 var(--value), #e5e5e5 0);
}

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

.capacity-list article {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  gap: 9px;
  align-items: center;
  padding: 10px 8px;
  border-top: 1px solid var(--line);
  border-radius: 7px;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.capacity-list article:hover,
.capacity-list article:focus-visible {
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.capacity-list article > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.capacity-list strong {
  font-size: 13px;
}

.capacity-list span {
  color: var(--muted);
  font-size: 12px;
}

.capacity-list i {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(90deg, #111111 var(--value), #e6e6e6 0);
}

.capacity-list article > em {
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.review-detail {
  gap: 12px;
}

.review-decision {
  gap: 12px;
}

.review-title {
  justify-content: space-between;
}

.review-title > div {
  min-width: 0;
}

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

.media-tile {
  min-height: 118px;
  display: grid;
  align-content: end;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.06), transparent 45%),
    repeating-linear-gradient(45deg, #f6f6f6 0 8px, #eeeeee 8px 16px);
}

.media-tile strong {
  font-size: 13px;
}

.media-tile span {
  color: var(--muted);
  font-size: 12px;
}

.review-actions {
  justify-content: flex-end;
}

.decision-checklist {
  display: grid;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.decision-checklist label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 800;
}

.decision-checklist input {
  width: 16px;
  height: 16px;
  accent-color: #16a34a;
}

.captcha-control-layout {
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
}

.captcha-command-card {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

.captcha-command-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.captcha-command-copy h3 {
  font-size: 18px;
  line-height: 1.2;
}

.captcha-command-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.captcha-command-actions {
  justify-content: flex-end;
}

.captcha-policy-card,
.captcha-provider-card,
.captcha-entry-card,
.captcha-test-card {
  gap: 12px;
}

.captcha-entry-filter-grid,
.captcha-entry-status-grid {
  display: grid;
  gap: 10px;
}

.captcha-entry-filter-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.captcha-entry-status-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.captcha-entry-status-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.captcha-entry-status-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.captcha-entry-status-head > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.captcha-entry-status-head strong {
  font-size: 13px;
}

.captcha-entry-status-head span,
.captcha-entry-reason,
.captcha-entry-facts span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
}

.captcha-entry-reason {
  margin: 0;
  color: #9f1239;
}

.captcha-entry-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.captcha-entry-facts div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.captcha-entry-facts strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.35;
}

.tenant-captcha-entry-panel {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.tenant-captcha-entry-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tenant-captcha-entry-heading h5 {
  margin: 0;
  font-size: 12px;
  color: var(--text);
}

.tenant-captcha-entry-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.tenant-captcha-entry-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.captcha-toggle-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

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

.policy-grid .span-2 {
  grid-column: 1 / -1;
}

.switch-field {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  cursor: pointer;
}

.captcha-master-switch {
  min-height: 100%;
  padding: 13px;
  background:
    linear-gradient(135deg, rgba(17, 17, 17, 0.04), transparent 58%),
    #ffffff;
}

.captcha-master-switch.is-enabled {
  border-color: #111111;
  box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.06);
}

.captcha-policy-card.is-readonly .switch-field,
.captcha-policy-card.is-readonly .captcha-scene-card,
.captcha-provider-card.is-readonly .field {
  cursor: default;
}

.captcha-policy-card.is-readonly .captcha-switch-control input,
.captcha-policy-card.is-readonly .scene-card input {
  cursor: default;
}

.captcha-policy-card.is-readonly .captcha-master-switch,
.captcha-provider-card.is-readonly input,
.captcha-provider-card.is-readonly select,
.captcha-policy-card.is-readonly input,
.captcha-policy-card.is-readonly select {
  background-color: #f8f8f8;
}

.captcha-provider-card.is-readonly input[readonly],
.captcha-policy-card.is-readonly input[readonly],
.captcha-policy-card.is-readonly select:disabled {
  color: var(--muted);
}

.switch-field span,
.scene-card span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.switch-field strong,
.scene-card strong {
  font-size: 13px;
}

.switch-field small,
.scene-card small,
.captcha-section-title span,
.captcha-test-flow small,
.secret-control span,
.log-note,
.ticket-preview small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
}

.switch-field input {
  width: 42px;
  height: 22px;
  flex: 0 0 auto;
  accent-color: #111111;
  cursor: pointer;
}

.captcha-switch-control {
  position: relative;
  display: inline-flex;
  width: 46px;
  height: 24px;
  flex: 0 0 auto;
  align-items: center;
}

.captcha-switch-control input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
}

.captcha-switch-track {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  transition:
    background-color 140ms ease,
    border-color 140ms ease;
}

.captcha-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #9ca3af;
  transition:
    background-color 140ms ease,
    transform 140ms ease;
}

.captcha-switch-control input:checked + .captcha-switch-track {
  border-color: #111111;
  background: #111111;
}

.captcha-switch-control input:checked + .captcha-switch-track::after {
  background: #ffffff;
  transform: translateX(21px);
}

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

.captcha-section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}

.captcha-section-title strong {
  font-size: 13px;
}

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

.scene-card {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.captcha-scene-card {
  transition:
    border-color 140ms ease,
    background-color 140ms ease,
    box-shadow 140ms ease;
}

.captcha-scene-card:hover {
  border-color: var(--line-strong);
  background: #fcfcfc;
}

.captcha-scene-card.is-enabled {
  border-color: #111111;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.05);
}

.captcha-scene-card.is-disabled {
  cursor: not-allowed;
  background: #f8f8f8;
  opacity: 0.66;
}

.captcha-scene-card.is-disabled:hover {
  border-color: var(--line);
  background: #f8f8f8;
}

.scene-card input {
  width: 16px;
  height: 16px;
  accent-color: #111111;
  cursor: pointer;
}

.captcha-scene-card.is-disabled input {
  cursor: not-allowed;
}

.captcha-provider-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.captcha-provider-grid .field:first-child {
  grid-column: span 2;
}

.captcha-provider-actions {
  justify-content: flex-start;
}

.secret-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.48fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid #d4d4d8;
  border-radius: 7px;
  background: #fafafa;
}

.secret-control div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.captcha-secret-control input {
  font-size: 12px;
}

.captcha-test-flow,
.client-preview-grid {
  display: grid;
  gap: 9px;
}

.captcha-test-flow {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.captcha-test-flow article {
  min-width: 0;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.captcha-test-flow article > span {
  width: 26px;
  height: 26px;
  grid-row: span 2;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.captcha-test-flow strong {
  font-size: 13px;
  line-height: 1.25;
}

.captcha-preview-layout {
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1fr);
}

.mock-login-panel {
  width: min(360px, 100%);
  display: grid;
  gap: 11px;
  margin: 0 auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f7f7f7);
}

.mock-login-head {
  display: grid;
  gap: 4px;
  padding-bottom: 6px;
}

.mock-login-head strong {
  font-size: 20px;
}

.mock-login-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.slider-verify,
.mini-slider,
.mock-slider-done {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--success-border);
  border-radius: 7px;
  background: var(--success-bg);
  color: var(--success-text);
  font-size: 12px;
  font-weight: 850;
}

.slider-verify i {
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
}

.client-preview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.client-preview-grid article {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.mini-slider {
  min-height: 32px;
  border-color: var(--line);
  background: #f7f7f7;
  color: var(--text);
}

.mini-slider i,
.mock-slider-done i {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #111111;
}

.captcha-surface-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.file-upload-button {
  position: relative;
  cursor: pointer;
}

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

.captcha-image-card {
  min-width: 0;
  gap: 10px;
}

.captcha-image-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(17, 17, 17, 0.05), transparent 45%),
    #f6f6f6;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.captcha-image-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.captcha-image-card.is-loading .captcha-image-preview::after,
.captcha-image-card.is-error .captcha-image-preview::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.captcha-image-card.is-loading .captcha-image-preview::after {
  content: "加载中";
}

.captcha-image-card.is-error .captcha-image-preview::after {
  content: "预览失败";
}

.captcha-image-card-foot {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.captcha-image-card code {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}

.danger-button {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b91c1c;
}

.danger-button:hover:not(:disabled) {
  border-color: #fca5a5;
  background: #ffe4e6;
}

.slide-captcha-crop-modal {
  display: grid;
  gap: 12px;
}

.slide-captcha-crop-copy {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fafafa;
}

.slide-captcha-crop-copy strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
}

.slide-captcha-crop-copy span,
.slide-captcha-crop-facts small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.slide-captcha-crop-stage-wrap {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 14px;
  border: 1px dashed #d4d4d8;
  border-radius: 8px;
  background:
    linear-gradient(45deg, rgba(17, 17, 17, 0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(17, 17, 17, 0.04) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(17, 17, 17, 0.04) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(17, 17, 17, 0.04) 75%),
    #f7f7f7;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.slide-captcha-crop-stage {
  width: min(100%, var(--captcha-crop-preview-width));
  height: auto;
  max-height: min(56vh, var(--captcha-crop-preview-height));
  display: block;
  border: 1px solid #111111;
  border-radius: 7px;
  background: #f4f4f5;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
  cursor: grab;
  touch-action: none;
}

.slide-captcha-crop-stage.is-dragging {
  cursor: grabbing;
}

.slide-captcha-crop-zoom input[type="range"] {
  width: 100%;
  accent-color: #111111;
  cursor: pointer;
}

.slide-captcha-crop-facts {
  min-width: 0;
}

.slide-captcha-crop-facts strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.gateway-login-slide-stage {
  display: grid;
  gap: 10px;
  min-height: 54px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 800;
}

.login-slide-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(14px);
}

.login-slide-modal {
  width: min(420px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(31, 31, 31, 0.96), rgba(11, 11, 11, 0.98)),
    #111111;
  color: #ffffff;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.46);
}

.login-slide-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.login-slide-modal-head strong {
  display: block;
  font-size: 16px;
}

.login-slide-modal-head span {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.5;
}

.login-slide-modal-head button {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
}

.login-slide-modal-head button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.login-slide-modal-body {
  display: grid;
  gap: 12px;
  padding: 16px 18px 18px;
}

.login-slide-modal-loading {
  min-height: 116px;
  display: grid;
  place-items: center;
}

.login-slide-modal-error {
  padding: 10px 12px;
  border: 1px solid rgba(248, 113, 113, 0.26);
  border-radius: 8px;
  background: rgba(127, 29, 29, 0.22);
  color: #fecaca;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.login-slide-modal .gateway-login-slide-stage {
  min-height: 232px;
}

.self-hosted-slide {
  display: grid;
  gap: 10px;
  width: min(100%, var(--slide-width));
}

.self-hosted-slide-board {
  position: relative;
  width: min(100%, var(--slide-width));
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #111111;
  user-select: none;
  touch-action: none;
}

.self-hosted-slide-bg,
.self-hosted-slide-piece {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

.self-hosted-slide-piece {
  width: var(--piece-size);
  height: var(--piece-size);
  inset: auto;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.34));
}

.self-hosted-slide-track {
  --slide-progress: 0%;
  position: relative;
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 10px 0 48px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) var(--slide-progress), rgba(255, 255, 255, 0.08) 0);
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 850;
  touch-action: none;
}

.self-hosted-slide-knob {
  position: absolute;
  left: 4px;
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
  font-size: 10px;
  font-weight: 900;
  cursor: grab;
  touch-action: none;
}

.self-hosted-slide-knob:active {
  cursor: grabbing;
}

.captcha-test-modal {
  display: grid;
  gap: 12px;
}

.mock-captcha-window {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.ticket-preview {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid var(--info-border);
  border-radius: 7px;
  background: var(--info-bg);
}

.ticket-preview span {
  color: var(--info-text);
  font-size: 12px;
  font-weight: 850;
}

.ticket-preview strong {
  font-size: 18px;
  letter-spacing: 0.02em;
}

.resource-summary-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.resource-summary-list div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  min-width: 0;
}

.resource-summary-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.resource-summary-list strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 880;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.entity-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.entity-card-grid.mini {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.entity-card {
  display: grid;
  gap: 9px;
  padding: 11px;
}

.entity-card .meter-row {
  display: none;
}

.entity-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 6px;
}

.entity-facts div {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.entity-facts span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.entity-facts strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-card-head,
.entity-foot {
  justify-content: space-between;
}

.server-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 12px;
}

.server-card {
  gap: 12px;
}

.server-card-head {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.server-card-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding-left: 18px;
  position: relative;
}

.server-card-head strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-card-head p {
  color: var(--muted);
  font-size: 12px;
}

.server-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.server-card-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.server-card-meta span {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfbfb;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.server-card-meta b {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bound-tenant-list {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding-left: 8px;
  border-left: 2px solid var(--success-text);
}

.bound-tenant-line {
  max-width: 100%;
  display: block;
  color: var(--success-text);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.bound-tenant-list.is-empty {
  border-left-color: var(--line);
}

.bound-tenant-line.is-empty {
  color: var(--muted);
  font-weight: 750;
}

.resource-bound-tenant-readonly {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
}

.resource-bound-tenant-readonly small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.server-dot {
  position: absolute;
  top: 4px;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--neutral-text);
  box-shadow: 0 0 0 5px var(--neutral-bg);
}

.server-dot[data-kind="success"] {
  background: var(--success-text);
  box-shadow: 0 0 0 5px var(--success-bg);
}

.server-dot[data-kind="warning"] {
  background: var(--warning-text);
  box-shadow: 0 0 0 5px var(--warning-bg);
}

.server-dot[data-kind="danger"] {
  background: var(--danger-text);
  box-shadow: 0 0 0 5px var(--danger-bg);
}

.server-health {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.server-capacity {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #fafafa);
}

.server-bars {
  display: grid;
  gap: 9px;
}

.metric-bar {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  align-items: center;
}

.metric-bar span {
  color: var(--muted);
  font-size: 12px;
}

.metric-bar strong {
  font-size: 12px;
}

.metric-bar i {
  grid-column: 1 / -1;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--violet) var(--value), #eceff3 0);
}

.ready-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
}

.ready-row span {
  color: var(--success-text);
  font-weight: 900;
}

.ready-row em {
  font-style: normal;
}

.endpoint-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.endpoint-list div {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfbfb;
  color: var(--text-2);
  font-size: 12px;
}

.resource-pool-card .server-card-meta span,
.server-card .endpoint-list div {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.endpoint-list b {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.endpoint-list span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-banner {
  background: var(--violet-soft);
  border-color: var(--violet-line);
}

.audit-banner-body {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.audit-banner-body div {
  min-width: 0;
  margin-right: auto;
}

.audit-banner-body strong {
  color: var(--violet);
  font-size: 14px;
}

.audit-banner-body p {
  color: #6d63bd;
  font-size: 12px;
  line-height: 1.45;
}

.editor-card {
  gap: 12px;
}

.preview-card {
  background: linear-gradient(180deg, #ffffff, #f7f7f7);
}

.device-preview {
  min-height: 260px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: inset 0 0 0 8px #f3f3f3;
}

.device-bar {
  width: 62px;
  height: 5px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: #d4d4d4;
}

.device-preview strong {
  font-size: 15px;
}

.audit-event {
  position: relative;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 10px 10px 0;
  border-color: transparent;
  background: transparent;
}

.audit-event::before {
  content: "";
  position: absolute;
  top: 25px;
  bottom: -9px;
  left: 6px;
  width: 1px;
  background: var(--line);
}

.audit-event:last-child::before {
  display: none;
}

.timeline-dot {
  width: 11px;
  height: 11px;
  display: inline-block;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--neutral-text);
}

.timeline-dot[data-kind="success"] {
  background: var(--success-text);
}

.timeline-dot[data-kind="warning"] {
  background: var(--warning-text);
}

.timeline-dot[data-kind="danger"] {
  background: var(--danger-text);
}

.timeline-dot[data-kind="info"] {
  background: var(--info-text);
}

.audit-event-body {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.audit-event-body > div,
.audit-event-body footer {
  justify-content: space-between;
}

.audit-event-body footer {
  color: var(--muted);
  font-size: 12px;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.matrix-cell {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-left-width: 4px;
}

.matrix-cell[data-kind="success"] {
  border-left-color: var(--success-text);
}

.matrix-cell[data-kind="warning"] {
  border-left-color: var(--warning-text);
}

.matrix-cell[data-kind="danger"] {
  border-left-color: var(--danger-text);
}

.matrix-cell[data-kind="info"] {
  border-left-color: var(--info-text);
}

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

.account-list-panel,
.account-detail-panel {
  min-height: 420px;
}

.account-record-list,
.account-security-stack,
.account-detail-body {
  display: grid;
  gap: 9px;
}

.account-record-list,
.account-security-stack,
.account-detail-body {
  align-content: start;
}

.account-detail-body {
  min-height: 100%;
}

.account-detail-workbench {
  min-height: 100%;
  display: grid;
  align-content: start;
  gap: 14px;
}

.account-inline-security {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.inline-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inline-section-head h4 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.inline-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.account-inline-security .account-security-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-inline-security .account-action-row {
  grid-column: 1 / -1;
}

.account-record-list {
  max-height: min(560px, calc(100vh - 310px));
  overflow: auto;
  padding-right: 2px;
}

.account-record-list::-webkit-scrollbar {
  width: 6px;
}

.account-record-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #c8c8c8;
}

.account-record-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.account-record-item:hover,
.account-record-item:focus-visible {
  border-color: #cfcfcf;
  background: #fafafa;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  outline: none;
}

.account-record-item.is-selected {
  border-color: var(--text);
  background: #111111;
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
}

.account-record-item.is-selected .account-record-main strong {
  color: #ffffff;
  transition: none;
}

.account-record-item.is-selected .avatar-token {
  background: #ffffff;
  color: var(--text);
  transition: none;
}

.account-record-item.is-selected small {
  color: rgba(255, 255, 255, 0.7);
  transition: none;
}

.account-record-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.account-record-main strong,
.account-record-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-record-main small {
  color: var(--muted);
  font-size: 12px;
}

.tenant-resource-layout {
  grid-template-columns: minmax(250px, 0.48fr) minmax(0, 1.52fr);
  align-items: stretch;
}

.tenant-resource-list,
.tenant-resource-editor {
  min-height: 520px;
}

.tenant-resource-record-list {
  max-height: min(660px, calc(100vh - 300px));
}

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

.access-config-layout {
  grid-template-columns: minmax(280px, 0.38fr) minmax(0, 1.62fr);
  align-items: start;
  gap: 14px;
}

.access-config-editor {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.access-config-page-shell {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.access-config-hero {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.76fr);
  gap: 14px;
  align-items: stretch;
  padding: 15px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #f8fafc;
}

.access-config-hero-main {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.access-config-eyebrow {
  width: max-content;
  padding: 3px 8px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 11px;
  font-weight: 850;
}

.access-config-hero h3 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1.25;
}

.access-config-hero p {
  max-width: 820px;
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.7;
}

.access-config-next-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-top: 2px;
  padding: 8px 10px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
  font-size: 12px;
}

.access-config-next-step span {
  min-width: 0;
}

.access-config-flow {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.access-config-flow article {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 8px;
  row-gap: 2px;
  align-content: start;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.access-config-flow b {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  font-size: 12px;
}

.access-config-flow span {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-config-flow small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-config-workflow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.access-config-main-flow,
.access-config-sidecar {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.access-config-sidecar {
  align-self: start;
  grid-template-columns: minmax(0, 1fr);
}

.access-config-panel {
  display: none;
}

.access-config-panel:not(.is-active) {
  display: none;
}

.access-config-panel.is-active {
  display: grid;
}

.access-config-status-grid,
.access-config-action-grid,
.access-config-json-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.access-config-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.access-config-tabs button {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 7px;
  row-gap: 1px;
  align-items: center;
  min-height: 48px;
  padding: 7px 8px;
  border-color: #e2e8f0;
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.access-config-tabs button.is-active {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.access-config-tabs b {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
}

.access-config-tabs button.is-active b {
  background: #fff;
  color: #111827;
}

.access-config-tabs span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-config-tabs em {
  font-size: 12px;
  font-style: normal;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-config-tabs button.is-active em {
  color: rgba(255, 255, 255, 0.78);
}

.access-config-state-notice {
  display: grid;
  gap: 4px;
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}

.access-config-status-card,
.access-config-action-card,
.access-config-json-card {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.access-config-status-grid {
  grid-template-columns: minmax(0, 1fr);
}

.access-config-status-card {
  border-color: #dbe4ef;
  background: #fbfdff;
}

.access-config-status-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 14px;
}

.access-config-status-card span,
.access-config-status-card small,
.access-config-status-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.access-config-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.access-config-section .resource-section-head {
  align-items: start;
}

.access-config-section .resource-section-head h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
}

.access-config-section .resource-section-head p,
.access-config-section > small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.access-config-quickstart {
  border-color: #bae6fd;
  background: #f0f9ff;
}

.access-config-quickstart .resource-section-head {
  gap: 10px;
}

.access-config-quickstart .primary-button {
  white-space: nowrap;
}

.access-config-advanced-defaults {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.access-config-advanced-defaults summary {
  cursor: pointer;
  padding: 9px 10px;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
}

.access-config-advanced-defaults[open] summary {
  border-bottom: 1px solid #e2e8f0;
}

.access-config-advanced-defaults > .form-grid,
.access-config-advanced-defaults > .access-config-modal-grid,
.access-config-advanced-defaults > p {
  padding: 10px;
}

.access-config-readonly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  padding: 10px;
}

.access-config-readonly-grid article {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.access-config-readonly-grid span,
.access-config-readonly-grid small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.access-config-readonly-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.access-config-default-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
  font-size: 12px;
}

.access-config-base-grid,
.access-config-quic-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.access-config-quic-grid .access-config-toggle-field {
  position: relative;
  min-height: 66px;
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.access-config-toggle-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.access-config-toggle-copy strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.access-config-toggle-copy small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.access-config-switch-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.access-config-switch-track {
  position: relative;
  flex: 0 0 auto;
  width: 54px;
  height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #e2e8f0;
  transition: background 160ms ease, border-color 160ms ease;
}

.access-config-switch-track::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.24);
  transition: transform 160ms ease;
}

.access-config-switch-track::after {
  content: "关";
  position: absolute;
  top: 50%;
  right: 9px;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.access-config-switch-input:checked + .access-config-switch-track {
  border-color: #2563eb;
  background: #2563eb;
}

.access-config-switch-input:checked + .access-config-switch-track::before {
  transform: translateX(26px);
}

.access-config-switch-input:checked + .access-config-switch-track::after {
  content: "开";
  right: auto;
  left: 10px;
  color: #fff;
}

.access-config-switch-input:focus-visible + .access-config-switch-track {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  outline-offset: 2px;
}

.access-config-table-wrap {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.access-config-endpoint-table {
  min-width: 1060px;
  border-collapse: separate;
  border-spacing: 0;
}

.access-config-endpoint-table th,
.access-config-endpoint-table td {
  vertical-align: top;
}

.access-config-endpoint-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
}

.access-config-endpoint-table td {
  border-bottom: 1px solid #edf2f7;
  background: #fff;
}

.access-config-endpoint-table tr:last-child td {
  border-bottom: 0;
}

.access-config-endpoint-list {
  display: grid;
  gap: 9px;
}

.access-config-endpoint-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fbfdff;
}

.access-config-endpoint-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.access-config-endpoint-main strong,
.access-config-endpoint-main span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-config-endpoint-main strong {
  color: var(--text);
  font-size: 13px;
}

.access-config-endpoint-main span {
  color: var(--text-2);
  font-size: 12px;
}

.access-config-endpoint-meta {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.access-config-endpoint-meta > span {
  max-width: 180px;
  overflow: hidden;
  padding: 4px 7px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-config-endpoint-actions {
  display: inline-flex;
  gap: 6px;
  justify-content: flex-end;
  white-space: nowrap;
}

.admin-action-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
}

.admin-action-dialog {
  width: min(460px, 100%);
  max-height: calc(100vh - 48px);
  display: grid;
  gap: 14px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  background: var(--surface);
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.24);
}

.access-config-endpoint-dialog {
  width: min(860px, calc(100vw - 32px));
}

.access-config-endpoint-dialog .route-head p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

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

.access-config-modal-grid .editor-field-wide {
  grid-column: 1 / -1;
}

.access-config-modal-grid textarea {
  min-height: 76px;
  resize: vertical;
}

.access-config-modal-advanced {
  margin-top: 4px;
}

.access-config-mini-field {
  margin-bottom: 8px;
}

.access-config-mini-field input,
.access-config-mini-field select,
.access-config-mini-field textarea,
.access-config-action-card textarea {
  min-height: 34px;
  border-color: #dbe4ef;
  border-radius: 7px;
  font-size: 12px;
}

.access-config-mini-field textarea {
  min-height: 58px;
  resize: vertical;
}

.access-config-row-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.access-config-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.access-config-platforms label,
.access-config-platform-disabled {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text-2);
  font-size: 12px;
}

.access-config-platform-disabled {
  color: var(--muted);
  background: #f8fafc;
}

.access-config-fault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.access-config-fault-grid article {
  display: grid;
  gap: 6px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.access-config-fault-grid small {
  color: var(--muted);
}

.access-config-issue-list {
  display: grid;
  gap: 8px;
}

.access-config-issue-list article {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(110px, 0.5fr) minmax(0, 1.7fr);
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff7f7;
  color: #991b1b;
  font-size: 12px;
}

.access-config-issue-list.is-warning article {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.access-config-json-card pre {
  max-height: 360px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.access-config-preview-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.access-config-preview-card {
  min-width: 0;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 12px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fbfdff;
}

.access-config-preview-card.is-wide {
  grid-column: 1 / -1;
}

.access-config-preview-card span,
.access-config-preview-card small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
}

.access-config-preview-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
}

.access-config-json-details .access-config-json-grid {
  padding: 10px;
}

.access-config-action-card {
  align-content: start;
  background: #fbfdff;
}

.access-config-action-card strong {
  font-size: 13px;
}

.access-config-action-card > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.access-config-action-card > button {
  width: fit-content;
  margin-top: 2px;
}

.access-config-utility-card {
  background: #fff;
}

.access-config-auto-confirm {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
}

.access-config-auto-confirm span {
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 850;
}

.access-config-auto-confirm small {
  color: #1e3a8a;
  font-size: 12px;
  line-height: 1.45;
}

.tenant-onboarding-layout {
  grid-template-columns: minmax(250px, 0.36fr) minmax(620px, 1fr);
  align-items: start;
}

.tenant-onboarding-tenant-list,
.tenant-onboarding-editor {
  min-height: 520px;
}

.tenant-onboarding-filter-panel {
  display: grid;
  gap: 9px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.tenant-onboarding-filter-head,
.tenant-onboarding-filter-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tenant-onboarding-filter-head strong {
  color: var(--text);
  font-size: 13px;
}

.tenant-onboarding-filter-head span,
.tenant-onboarding-filter-actions span {
  color: var(--muted);
  font-size: 12px;
}

.tenant-onboarding-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.tenant-onboarding-filter-field {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.tenant-onboarding-filter-field.is-wide {
  grid-column: 1 / -1;
}

.tenant-onboarding-filter-field span {
  color: var(--muted);
  font-size: 11px;
}

.tenant-onboarding-filter-field input,
.tenant-onboarding-filter-field select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  outline: none;
}

.tenant-onboarding-filter-field input:focus,
.tenant-onboarding-filter-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(73, 99, 240, 0.12);
}

.tenant-onboarding-filter-actions button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
}

.tenant-onboarding-filter-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.tenant-onboarding-form,
.tenant-onboarding-sections,
.tenant-onboarding-result-panel,
.tenant-onboarding-step-results {
  display: grid;
  gap: 12px;
}

.tenant-onboarding-stepper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 6px;
}

.tenant-onboarding-stepper button {
  min-width: 0;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text-2);
  font-size: 12px;
  text-align: center;
  cursor: pointer;
}

.tenant-onboarding-stepper button.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: #eef2ff;
}

.tenant-onboarding-stepper button.is-complete:not(.is-active) {
  border-color: #bbf7d0;
  color: #166534;
  background: #f0fdf4;
}

.tenant-onboarding-current,
.tenant-onboarding-derived-grid,
.tenant-onboarding-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.tenant-onboarding-current article,
.tenant-onboarding-derived-grid article,
.tenant-onboarding-step-results article {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.tenant-onboarding-current span,
.tenant-onboarding-current small,
.tenant-onboarding-derived-grid span,
.tenant-onboarding-step-results small {
  color: var(--muted);
  font-size: 12px;
}

.tenant-onboarding-section {
  display: grid;
  gap: 12px;
}

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

.tenant-onboarding-option-grid.is-single {
  grid-template-columns: 1fr;
}

.tenant-onboarding-app-filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.tenant-onboarding-app-filter-field {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.tenant-onboarding-app-filter-field span {
  color: var(--muted);
  font-size: 11px;
}

.tenant-onboarding-app-filter-field input,
.tenant-onboarding-app-filter-field select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  outline: none;
}

.tenant-onboarding-app-filter-field input:focus,
.tenant-onboarding-app-filter-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(73, 99, 240, 0.12);
}

.tenant-onboarding-app-filter-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.tenant-onboarding-app-filter-summary button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
}

.tenant-onboarding-app-filter-summary button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.tenant-onboarding-option {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 74px;
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}

.tenant-onboarding-option.is-selected {
  border-color: var(--accent);
  background: #f8faff;
}

.tenant-onboarding-option.is-disabled {
  color: var(--muted);
  background: #f8fafc;
  cursor: not-allowed;
}

.tenant-onboarding-option input {
  inline-size: 18px;
  block-size: 18px;
}

.tenant-onboarding-option > span {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding-right: 86px;
}

.tenant-onboarding-app-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tenant-onboarding-app-heading strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-onboarding-platform-badge {
  flex: 0 0 auto;
  max-width: 74px;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
  font-size: 11px;
  font-style: normal;
  font-weight: 820;
  line-height: 1;
  text-transform: uppercase;
}

.tenant-onboarding-platform-badge[data-platform="ios"] {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #4f46e5;
}

.tenant-onboarding-platform-badge[data-platform="android"] {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.tenant-onboarding-platform-badge[data-platform="web"] {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #0369a1;
}

.tenant-onboarding-platform-badge[data-platform="local"],
.tenant-onboarding-platform-badge[data-platform="unknown"] {
  border-color: #e5e7eb;
  background: #f8fafc;
  color: #64748b;
}

.tenant-onboarding-option small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-onboarding-option > .status-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  max-width: 86px;
  min-height: 18px;
  gap: 4px;
  overflow: hidden;
  padding: 0 6px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
}

.tenant-onboarding-option > .status-badge::before {
  width: 5px;
  height: 5px;
  box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 10%, transparent);
}

.tenant-onboarding-option > .status-badge[data-kind="success"] {
  color: #059669;
}

.tenant-onboarding-option > .status-badge[data-kind="neutral"] {
  color: #64748b;
}

.tenant-onboarding-option > .status-badge[data-kind="warning"],
.tenant-onboarding-option > .status-badge[data-kind="danger"] {
  border-color: color-mix(in srgb, currentColor 18%, transparent);
  background: color-mix(in srgb, currentColor 7%, #ffffff);
}

.tenant-onboarding-form-grid label {
  display: grid;
  gap: 6px;
}

.tenant-onboarding-form-grid span,
.tenant-onboarding-confirm p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tenant-onboarding-form-grid input,
.tenant-onboarding-form-grid select,
.tenant-onboarding-form-grid textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid #d9dee8;
  border-radius: 8px;
  background-color: #ffffff;
  color: var(--text);
  outline: 0;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.tenant-onboarding-form-grid input,
.tenant-onboarding-form-grid textarea {
  padding: 8px 10px;
}

.tenant-onboarding-form-grid select {
  appearance: none;
  min-height: 42px;
  padding: 8px 40px 8px 12px;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% + 2px),
    calc(100% - 13px) calc(50% + 2px);
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.02);
  font-weight: 700;
}

.tenant-onboarding-form-grid input:hover:not(:disabled),
.tenant-onboarding-form-grid select:hover:not(:disabled),
.tenant-onboarding-form-grid textarea:hover:not(:disabled) {
  border-color: #aeb8c8;
  background-color: #fbfdff;
}

.tenant-onboarding-form-grid input:focus,
.tenant-onboarding-form-grid select:focus,
.tenant-onboarding-form-grid textarea:focus {
  border-color: #111111;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.tenant-onboarding-form-grid select:disabled {
  color: var(--muted);
  background-color: #f8fafc;
  cursor: not-allowed;
}

.tenant-onboarding-confirm textarea {
  resize: vertical;
}

.tenant-onboarding-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 4px;
}

.tenant-onboarding-preview-execution {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.tenant-onboarding-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.tenant-onboarding-summary-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.tenant-onboarding-summary-card.is-wide {
  grid-column: span 2;
}

.tenant-onboarding-summary-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tenant-onboarding-summary-card header > span {
  min-width: 0;
  color: var(--text);
  font-weight: 850;
}

.tenant-onboarding-summary-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.tenant-onboarding-summary-card dl div {
  display: grid;
  grid-template-columns: minmax(72px, 0.34fr) minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.tenant-onboarding-summary-card dt,
.tenant-onboarding-summary-card dd {
  min-width: 0;
  margin: 0;
}

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

.tenant-onboarding-summary-card dd {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-onboarding-data-block pre {
  max-height: 260px;
}

.field-error {
  display: block;
  margin-top: 4px;
  color: #dc2626;
  font-size: 11px;
  line-height: 1.35;
}

.resource-module-tab .status-badge,
.resource-status-stack .status-badge,
.server-tools .status-badge,
.server-card-meta .status-badge {
  width: max-content;
  max-width: 100%;
  justify-self: start;
}

.resource-module-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.radio-card-grid {
  align-items: stretch;
}

.resource-module-tab {
  min-width: 0;
  min-height: 78px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 7px;
  background: transparent;
  color: var(--text-2);
  box-shadow: none;
  text-align: left;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.resource-module-tab:hover,
.resource-module-tab:focus-visible,
.tool-item:hover,
.tool-item:focus-visible {
  border-color: #cfcfcf;
  background: #fafafa;
  color: var(--text);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
  outline: none;
}

.radio-card-head {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  align-items: center;
  gap: 8px;
}

.radio-card-title {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radio-card-meta {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.radio-card-control {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: 2px solid #cfd4dc;
  border-radius: 999px;
  background: #ffffff;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.radio-card-control::after {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0;
  transform: scale(0.55);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  content: "";
}

.radio-card-status {
  min-width: 0;
  display: flex;
  align-items: center;
}

.resource-module-tab .status-badge {
  min-height: 18px;
  padding: 0 5px;
  font-size: 9.5px;
}

.resource-module-tab.is-active {
  border-color: var(--text);
  background: var(--text);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

.resource-module-tab.is-active .radio-card-title,
.resource-module-tab.is-active .radio-card-meta,
.resource-module-tab.is-active .radio-card-status,
.tool-item.is-active .radio-card-title,
.tool-item.is-active .radio-card-status {
  color: #ffffff;
  transition: none;
}

.resource-module-tab.is-active .radio-card-control,
.tool-item.is-active .radio-card-control {
  border-color: #ffffff;
  background: #ffffff;
  color: #111111;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16);
}

.resource-module-tab.is-active .radio-card-control::after,
.tool-item.is-active .radio-card-control::after {
  opacity: 1;
  transform: scale(1);
}

.resource-module-tab.is-active .status-badge {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transition: none;
}

.resource-type-nav .resource-module-tab.is-active .status-badge[data-kind="success"] {
  border-color: color-mix(in srgb, var(--success-border) 76%, #ffffff);
  background: color-mix(in srgb, var(--success-bg) 72%, #ffffff);
  color: var(--success-text);
}

.resource-type-nav .resource-module-tab.is-active .status-badge[data-kind="warning"] {
  border-color: color-mix(in srgb, var(--warning-border) 78%, #ffffff);
  background: color-mix(in srgb, var(--warning-bg) 72%, #ffffff);
  color: var(--warning-text);
}

.resource-section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.resource-section-title div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.resource-section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.resource-field-section {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.resource-field-section h4 {
  margin: 0;
  font-size: 13px;
  color: var(--text);
}

.resource-form-grid,
.resource-secret-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 10px;
}

.resource-field {
  align-content: start;
}

.tenant-resource-form[data-active-resource-module="kyc"][data-kyc-mode="manual"] [data-resource-field-wrap="kyc_mode"] {
  grid-column: 1 / -1;
}

.tenant-resource-form[data-active-resource-module="kyc"][data-kyc-mode="manual"] [data-resource-field-wrap="kyc_resource_id"],
.tenant-resource-form[data-active-resource-module="kyc"][data-kyc-mode="manual"] .kyc-routing-note-auto,
.tenant-resource-form[data-active-resource-module="kyc"][data-kyc-mode="auto"] .kyc-routing-note-manual {
  display: none;
}

.kyc-routing-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.kyc-routing-note strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.kyc-routing-note span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.tenant-license-section {
  background: #ffffff;
}

.tenant-license-bound,
.tenant-license-picker {
  display: grid;
  gap: 12px;
}

.tenant-license-hero {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8f8f8);
}

.tenant-license-hero div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.tenant-license-hero span,
.tenant-license-detail-grid article span,
.tenant-license-guide span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.tenant-license-hero strong {
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-license-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.tenant-license-detail-grid article,
.tenant-license-guide {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.tenant-license-detail-grid article strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-license-select-field {
  grid-column: 1 / -1;
}

.tenant-license-select {
  font-size: 12px;
}

.tenant-license-guide strong {
  font-size: 13px;
}

.resource-pool-field {
  grid-column: 1 / -1;
}

.resource-pool-select {
  width: 100%;
  min-height: 34px;
  padding: 0 34px 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background:
    linear-gradient(45deg, transparent 50%, #555 50%) right 14px center / 6px 6px no-repeat,
    linear-gradient(135deg, #555 50%, transparent 50%) right 9px center / 6px 6px no-repeat,
    #ffffff;
  color: var(--text);
  font-size: 12px;
  outline: none;
  appearance: none;
}

.resource-pool-select:focus {
  border-color: #111111;
  box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.08);
}

.resource-network-section {
  background: #ffffff;
}

.resource-network-selector {
  grid-template-columns: 1fr;
}

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

.resource-derived-card {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f8f8;
}

.resource-derived-card span,
.resource-derived-card small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-derived-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-derived-card[data-empty="true"] strong {
  color: var(--muted);
  font-weight: 700;
}

.resource-probe-panel {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.resource-probe-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.resource-probe-inline-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.resource-probe-inline-copy strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-probe-inline-copy small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-probe-inline-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.resource-probe-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.resource-probe-heading h5 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.resource-probe-heading p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.resource-probe-heading button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
}

.resource-probe-heading .readonly-chip {
  flex: 0 0 auto;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

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

.resource-probe-card {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.resource-probe-card-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.resource-probe-card-head span,
.resource-probe-card small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-probe-card .status-badge {
  flex: 0 0 auto;
}

.resource-probe-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-runtime-panel {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.tenant-runtime-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tenant-runtime-heading h4 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.tenant-runtime-heading p,
.tenant-runtime-note {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.tenant-runtime-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.tenant-runtime-card {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.tenant-runtime-card-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tenant-runtime-card-head span,
.tenant-runtime-card small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-runtime-card .status-badge {
  flex: 0 0 auto;
}

.tenant-runtime-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-runtime-card strong .runtime-endpoint-text {
  display: block;
}

.tenant-runtime-card[data-empty="true"] strong {
  color: var(--muted);
  font-weight: 700;
}

.resource-field-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 25px;
}

.resource-field-guide small {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.resource-link-button {
  min-height: 26px;
  padding: 0 9px;
  border-color: #d8d8d8;
  background: #ffffff;
  color: var(--text);
  font-size: 11px;
  white-space: nowrap;
}

.resource-link-button:hover {
  border-color: #111111;
  background: #f4f4f4;
  color: #111111;
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.08);
}

.resource-link-button:focus-visible {
  border-color: #111111;
  background: #f4f4f4;
  color: #111111;
}

.field input[readonly],
.field textarea[readonly],
.secret-ref-control input[readonly] {
  border-color: #e6e6e6;
  background: linear-gradient(180deg, #fbfbfb, #f6f6f6);
  color: var(--text);
  box-shadow: none;
  cursor: default;
}

.field input[readonly]::placeholder,
.field textarea[readonly]::placeholder {
  color: transparent;
}

.field input[readonly]:focus,
.field textarea[readonly]:focus,
.secret-ref-control input[readonly]:focus {
  border-color: #d6d6d6;
  outline: none;
  box-shadow: none;
}

.resource-field .field-error {
  min-height: 15px;
  color: #c2410c;
  font-size: 11px;
  line-height: 1.25;
}

.resource-field[data-invalid="true"] input,
.resource-field[data-invalid="true"] textarea,
.resource-field[data-invalid="true"] select {
  border-color: #ef4444;
  background: #fff7f7;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.08);
}

.resource-field[data-invalid="true"] .resource-multi-selected {
  border-color: #ef4444;
  background: #fff7f7;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.08);
}

.resource-field[data-invalid="true"] .resource-push-provider-option {
  border-color: #ef4444;
  background: #fff7f7;
}

.resource-field select[multiple] {
  min-height: 92px;
  padding: 6px;
  background-image: none;
  cursor: default;
}

.resource-field select[multiple] option {
  padding: 6px 8px;
  border-radius: 5px;
}

.resource-multi-field {
  grid-column: 1 / -1;
}

.resource-multi-shell {
  display: grid;
  gap: 8px;
}

.resource-multi-selected {
  min-height: 46px;
  display: flex;
  align-items: center;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 7px;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfbfb, #f7f7f7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  scrollbar-width: none;
}

.resource-multi-selected::-webkit-scrollbar {
  display: none;
}

.resource-multi-selected-track {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: max-content;
}

.resource-multi-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.resource-multi-tag {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: #e9e9eb;
  color: #181818;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.resource-multi-tag:hover {
  background: #dedee1;
  transform: translateY(-1px);
}

.resource-multi-tag:focus-visible {
  outline: 2px solid rgba(17, 17, 17, 0.28);
  outline-offset: 2px;
}

.resource-multi-tag.is-selected {
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(15, 15, 15, 0.12), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.resource-multi-tag.is-selected:hover {
  background: #ffffff;
}

.resource-multi-tag[disabled] {
  cursor: default;
  transform: none;
}

.resource-multi-tag i {
  font-style: normal;
  font-size: 15px;
  line-height: 1;
  color: #6b7280;
}

.resource-multi-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.resource-push-provider-shell {
  gap: 10px;
}

.resource-push-provider-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 32px;
  padding: 8px 10px;
  border: 1px solid #e6e6ef;
  border-radius: 8px;
  background: #fafafa;
}

.resource-push-provider-status strong {
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
}

.resource-push-provider-status small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-push-provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(164px, 1fr));
  gap: 9px;
  width: 100%;
}

.resource-push-provider-grid[data-resource-push-checkbox-list] {
  align-items: stretch;
}

.resource-push-provider-option {
  min-width: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.resource-push-provider-option:hover {
  border-color: #c9c9cf;
  background: #fbfbfb;
  transform: translateY(-1px);
}

.resource-push-provider-option:focus-within {
  outline: 2px solid rgba(17, 17, 17, 0.24);
  outline-offset: 2px;
}

.resource-push-provider-option.is-selected {
  border-color: rgba(76, 81, 191, 0.48);
  background: #f7f8ff;
  box-shadow: 0 8px 22px rgba(76, 81, 191, 0.12);
}

.resource-push-provider-option input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: #4f46e5;
  cursor: pointer;
}

.resource-push-provider-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.resource-push-provider-copy strong,
.resource-push-provider-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-push-provider-copy strong {
  color: #111827;
  font-size: 12px;
  font-weight: 780;
}

.resource-push-provider-copy small {
  color: var(--muted);
  font-size: 11px;
}

.resource-push-provider-badge {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.resource-push-selected-fields {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e6e6ef;
  border-radius: 8px;
  background: #fbfbff;
}

.resource-push-selected-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.resource-push-selected-header span {
  color: #111827;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.3;
  white-space: nowrap;
}

.resource-push-selected-header small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-push-vendor-fields {
  display: grid;
  gap: 12px;
}

.resource-push-vendor-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e6e6ef;
  border-radius: 8px;
  background: #ffffff;
}

.resource-push-empty-fields {
  border-style: dashed;
}

.secret-ref-control {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.secret-ref-control > span {
  display: grid;
  gap: 3px;
}

.secret-ref-control small {
  color: var(--muted);
  font-size: 11px;
}

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

.resource-form-actions span {
  color: var(--muted);
  font-size: 12px;
}

.resource-status-stack {
  display: grid;
  gap: 9px;
}

.resource-status-stack article {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.resource-status-stack article span,
.resource-status-stack article small {
  color: var(--muted);
  font-size: 12px;
}

.resource-status-stack article strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1280px) {
  .tenant-resource-layout {
    grid-template-columns: 1fr;
  }

  .access-config-workflow-grid,
  .access-config-hero {
    grid-template-columns: 1fr;
  }

  .access-config-sidecar {
    position: static;
  }

  .tenant-onboarding-layout {
    grid-template-columns: 1fr;
  }

  .tenant-resource-list,
  .tenant-resource-editor,
  .tenant-onboarding-tenant-list,
  .tenant-onboarding-editor,
  .tenant-resource-status {
    min-height: unset;
  }

  .tenant-onboarding-summary-card.is-wide {
    grid-column: auto;
  }

  .tenant-onboarding-filter-grid {
    grid-template-columns: 1fr;
  }

  .tenant-onboarding-app-filter-panel {
    grid-template-columns: 1fr;
  }

  .tenant-onboarding-option-grid {
    grid-template-columns: 1fr;
  }

  .resource-module-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .resource-pool-guide {
    grid-template-columns: 1fr;
  }

  .server-card-meta,
  .endpoint-list,
  .resource-derived-grid,
  .resource-probe-grid,
  .resource-summary-list,
  .tenant-runtime-grid,
  .resource-form-grid,
  .resource-secret-grid,
  .tenant-license-detail-grid {
    grid-template-columns: 1fr;
  }
}

.account-identity {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: linear-gradient(180deg, #ffffff, #f7f7f7);
}

.avatar-token.is-large {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 15px;
}

.account-identity div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.account-identity strong {
  font-size: 17px;
}

.account-identity span,
.account-field-grid span,
.account-security-stack span {
  color: var(--muted);
  font-size: 12px;
}

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

.account-field-grid.is-wide {
  grid-template-columns: repeat(2, minmax(150px, 1fr));
}

.account-field-grid article,
.account-security-stack article {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.account-field-grid strong,
.account-security-stack strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-field-grid article.is-wide {
  grid-column: 1 / -1;
}

.account-field-grid article.is-wide strong {
  white-space: normal;
}

.permission-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.permission-chip-list span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid #d9d9d9;
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 850;
}

.platform-role-list-actions,
.platform-account-list-actions,
.platform-role-actions {
  justify-content: flex-start;
  margin: 0 0 10px;
}

.platform-role-detail {
  display: grid;
  align-content: start;
  gap: 12px;
}

.platform-role-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.platform-role-readonly {
  margin: 0;
}

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

.platform-role-permission-group {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.platform-role-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.platform-role-group-head strong {
  color: var(--text);
  font-size: 13px;
}

.platform-role-group-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.platform-role-permission-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 8px;
}

.platform-role-page-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 850;
  text-align: left;
}

.platform-role-page-chip:not(.is-readonly) {
  cursor: pointer;
}

.platform-role-page-chip:not(.is-readonly):hover,
.platform-role-page-chip:not(.is-readonly):focus-visible {
  border-color: var(--text);
  background: #f5f5f5;
  outline: none;
}

.platform-role-page-chip.is-on {
  border-color: var(--text);
  background: #111111;
  color: #ffffff;
}

.platform-role-checkbox {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1.5px solid currentColor;
  border-radius: 4px;
}

.platform-role-page-chip.is-on .platform-role-checkbox::after {
  content: "";
  width: 8px;
  height: 5px;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg) translateY(-1px);
}

.account-security-stack article {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.account-security-stack article > span,
.account-security-stack article > small {
  grid-column: 1 / -1;
}

.account-action-row {
  align-items: center;
  gap: 7px;
}

.account-action-hint {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.google-auth-card {
  min-width: 0;
}

.google-auth-notice,
.google-auth-setup-box,
.google-auth-policy {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.google-auth-notice {
  grid-template-columns: minmax(180px, 0.38fr) minmax(0, 1fr);
  align-items: center;
}

.google-auth-notice.is-forced {
  border-color: #111111;
  background: #f7f7f7;
}

.google-auth-notice strong,
.google-auth-policy strong {
  color: var(--text);
  font-size: 14px;
}

.google-auth-notice span,
.google-auth-policy small,
.google-auth-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.google-auth-setup-box {
  margin-top: 12px;
  background: #ffffff;
}

.google-auth-setup-content {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.google-auth-qr {
  width: 148px;
  height: 148px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.google-auth-setup-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.google-auth-setup-copy textarea {
  min-height: 72px;
  padding-top: 8px;
  resize: vertical;
}

.google-auth-policy {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.google-auth-policy > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.inline-error {
  margin: 0 0 10px;
  padding: 9px 10px;
  border: 1px solid #f1c6c6;
  border-radius: 8px;
  background: #fff6f6;
  color: #8a1f1f;
  font-size: 12px;
  line-height: 1.45;
}

.account-action-row button {
  min-height: 32px;
  padding-inline: 11px;
}

.summary-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px;
}

.tool-layout {
  grid-template-columns: minmax(230px, 0.36fr) minmax(0, 1fr);
}

.tool-item {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 54px;
  padding: 9px 10px;
  border-radius: 7px;
  text-align: left;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.tool-item.is-active {
  border-color: var(--text);
  background: var(--text);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

.tool-item.is-active .status-badge {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transition: none;
}

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

.filter-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 230px));
  justify-content: start;
  align-items: end;
  gap: 10px;
  padding: 2px 0 0;
}

.field {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.filter-grid .field {
  width: 100%;
  max-width: 230px;
}

.filter-grid.tenant-admin-filter-grid {
  width: min(100%, 850px);
  max-width: 850px;
  grid-template-columns: minmax(170px, 230px) minmax(260px, 1fr) minmax(130px, 180px);
}

.filter-grid.tenant-admin-filter-grid .field {
  max-width: none;
}

.filter-grid.captcha-log-filter-grid {
  width: min(100%, 820px);
  max-width: 820px;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.filter-grid.captcha-log-filter-grid .field {
  max-width: none;
}

.filter-grid.captcha-log-filter-grid .field[data-filter-field="tenant"] {
  grid-column: span 2;
}

.gateway-main[data-page-id="reviewSimulation"] .filter-grid .field[data-filter-field="app_id"] {
  grid-column: span 2;
  max-width: none;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background-color: var(--surface);
  color: var(--text);
  padding: 0 10px;
  font-size: 13px;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background-color 140ms ease;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--line-strong);
  background-color: #fcfcfc;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--text);
  background-color: #ffffff;
}

.password-input-shell {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.password-input-shell input {
  padding-right: 48px;
}

.password-toggle-button {
  position: absolute;
  top: 50%;
  right: 6px;
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  height: 28px;
  width: 34px;
  min-width: 34px;
  padding: 0;
  transform: translateY(-50%);
  border-radius: 5px;
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(248, 250, 252, 0.96);
  color: var(--neutral-text);
  line-height: 1;
}

.password-toggle-icon {
  grid-area: 1 / 1;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle-icon-eye-off {
  display: none;
}

.password-toggle-button[aria-pressed="true"] {
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.28);
  background: #ffffff;
}

.password-toggle-button[aria-pressed="true"] .password-toggle-icon-eye {
  display: none;
}

.password-toggle-button[aria-pressed="true"] .password-toggle-icon-eye-off {
  display: block;
}

.password-toggle-button:focus-visible {
  outline: 0;
  box-shadow: var(--focus);
}

.date-input-shell {
  position: relative;
  display: block;
  cursor: pointer;
}

.date-create-field {
  cursor: pointer;
}

.date-input-shell input[type="date"] {
  appearance: none;
  cursor: pointer;
  padding-right: 36px;
  line-height: 34px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfb 100%);
}

.date-input-shell input[type="date"]::-webkit-calendar-picker-indicator {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.72;
  transition:
    opacity 140ms ease,
    background-color 140ms ease;
}

.date-input-shell input[type="date"]::-webkit-calendar-picker-indicator:hover {
  background-color: rgba(0, 0, 0, 0.06);
  opacity: 1;
}

.field[data-invalid="true"] input,
.field[data-invalid="true"] select,
.field[data-invalid="true"] textarea {
  border-color: rgba(220, 38, 38, 0.72);
  background: rgba(254, 242, 242, 0.72);
}

.field-hint,
.field-error {
  min-height: 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.field-error {
  color: #dc2626;
}

.field textarea {
  min-height: 74px;
  padding: 8px 9px;
  resize: vertical;
}

.field select,
.role-select {
  appearance: none;
  cursor: pointer;
  padding-right: 32px;
  background-image:
    linear-gradient(45deg, transparent 50%, #525252 50%),
    linear-gradient(135deg, #525252 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 50%,
    calc(100% - 11px) 50%;
  background-size:
    5px 5px,
    5px 5px;
  background-repeat: no-repeat;
}

.gateway-login-card .field input,
.gateway-login-card .field select,
.gateway-login-card .field textarea,
.gateway-login-card .login-captcha-fields input {
  border-color: rgba(255, 255, 255, 0.18);
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  caret-color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}

.gateway-login-card .field input:hover,
.gateway-login-card .field select:hover,
.gateway-login-card .field textarea:hover,
.gateway-login-card .login-captcha-fields input:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background-color: rgba(255, 255, 255, 0.1);
}

.gateway-login-card .field input:focus,
.gateway-login-card .field input:focus-visible,
.gateway-login-card .field select:focus,
.gateway-login-card .field select:focus-visible,
.gateway-login-card .field textarea:focus,
.gateway-login-card .field textarea:focus-visible,
.gateway-login-card .login-captcha-fields input:focus,
.gateway-login-card .login-captcha-fields input:focus-visible {
  border-color: rgba(255, 255, 255, 0.62);
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  -webkit-text-fill-color: #ffffff;
}

.gateway-login-card .field input:-webkit-autofill,
.gateway-login-card .field input:-webkit-autofill:hover,
.gateway-login-card .field input:-webkit-autofill:focus {
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow:
    0 0 0 1000px #151515 inset,
    0 0 0 3px rgba(255, 255, 255, 0.1);
  -webkit-text-fill-color: #ffffff;
  caret-color: #ffffff;
  transition: background-color 9999s ease-out;
}

.gateway-login-card input::selection,
.gateway-login-card textarea::selection {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.select-control {
  position: relative;
  width: 100%;
  min-width: 0;
}

.select-trigger {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 9px 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  outline: none;
  overflow: hidden;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background-color 140ms ease;
}

.select-trigger:hover {
  border-color: var(--line-strong);
  background: #fcfcfc;
}

.select-trigger:focus-visible,
.select-control.is-open .select-trigger {
  border-color: var(--text);
  background: #ffffff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 0 0 3px rgba(23, 23, 23, 0.09);
}

.select-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-trigger svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--muted);
  transition: transform 140ms ease;
}

.select-trigger path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.select-control.is-open .select-trigger svg {
  transform: rotate(180deg);
}

.select-menu {
  position: absolute;
  z-index: 90;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  min-width: 180px;
  max-height: 260px;
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
  overflow-x: hidden;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top;
  transition:
    opacity 140ms ease,
    visibility 140ms ease,
    transform 140ms ease;
  scrollbar-width: thin;
  scrollbar-color: #d4d4d4 transparent;
}

.select-search {
  position: sticky;
  top: -6px;
  z-index: 1;
  padding: 4px 0 6px;
  background: #ffffff;
}

.select-search input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafafa;
  color: var(--text);
  font-size: 13px;
  outline: none;
}

.select-search input:focus {
  border-color: var(--text);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(23, 23, 23, 0.08);
}

.select-menu::-webkit-scrollbar {
  width: 8px;
}

.select-menu::-webkit-scrollbar-track {
  background: transparent;
}

.select-menu::-webkit-scrollbar-thumb {
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #d4d4d4;
}

.select-control.is-open .select-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.select-option {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 31px;
  display: flex;
  align-items: center;
  padding: 6px 9px 6px 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  outline: none;
  transition: background-color 120ms ease;
}

.select-option:hover,
.select-option:focus-visible {
  background: #f4f4f5;
}

.select-option.is-selected {
  background: #f7f7f8;
}

.select-option.is-selected::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  transform: translateY(-65%) rotate(-45deg);
}

.select-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-tenant-detail-list {
  display: grid;
  gap: 8px;
}

.user-tenant-detail-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfb;
}

.user-tenant-detail-main,
.user-tenant-invite-code {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.user-tenant-detail-main strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-tenant-detail-main span,
.user-tenant-invite-code span,
.user-tenant-invite-code small {
  color: var(--muted);
  font-size: 12px;
}

.user-tenant-invite-code {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-items: start;
}

.user-tenant-invite-code code,
.user-tenant-invite-code .copyable-text {
  max-width: 100%;
  overflow: hidden;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f2f4f7;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-tenant-invite-code .copyable-text {
  display: inline-flex;
  width: fit-content;
  color: var(--text);
}

.user-tenant-invite-code code.is-empty {
  color: var(--muted);
}

.tenant-admin-filter-grid .field[data-filter-field="tenant"] .select-menu {
  width: min(520px, calc(100vw - 48px));
  max-width: min(520px, calc(100vw - 48px));
}

.bulk-bar {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid #d4d4d4;
  border-radius: 7px;
  background: #f7f7f7;
}

.bulk-actions {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.primary-button {
  border-color: var(--accent);
  background: linear-gradient(180deg, #171717 0%, #0d0d0d 100%);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.08);
}

.primary-button:hover:not(:disabled),
.primary-button:focus-visible:not(:disabled),
.primary-button:active:not(:disabled) {
  border-color: var(--accent);
  background: linear-gradient(180deg, #262626 0%, #111111 100%);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 6px 16px rgba(0, 0, 0, 0.14);
  transform: translateY(-1px);
}

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

.soft-button {
  background: var(--surface-2);
}

.gateway-content button,
.gateway-header button,
.drawer button,
.modal button {
  font-size: 13px;
  font-weight: 750;
}

.gateway-content .workbench-tabs .tab-button {
  font-size: 15px;
  font-weight: 780;
}

.gateway-content .workbench-tabs .tab-button.is-active {
  font-weight: 860;
}

.table-actions button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
}

.data-wrap {
  min-width: 0;
  position: relative;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.data-wrap.is-refreshing {
  overflow: auto;
}

.data-refresh-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  min-height: 100%;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(2px);
  pointer-events: none;
}

.data-refresh-overlay .data-inline-loader {
  min-height: 92px;
}

.data-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  table-layout: fixed;
}

.data-table th,
.data-table td {
  min-width: 0;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

.data-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  background: var(--surface-2);
}

.data-table th.license-bound-tenant-col,
.data-table td.license-bound-tenant-col {
  width: 220px;
  min-width: 220px;
}

.data-table th.license-issuer-remark-col,
.data-table td.license-issuer-remark-col {
  width: 280px;
  min-width: 280px;
  max-width: 280px;
}

.data-table td.license-issuer-remark-col .cell-text {
  max-width: 252px;
}

.data-table th.license-name-col,
.data-table td.license-name-col {
  width: 220px;
  min-width: 220px;
}

.data-table th.license-dynamic-capability-col,
.data-table td.license-dynamic-capability-col {
  width: 260px;
  min-width: 260px;
}

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

.data-table tbody tr:hover {
  background: #f7f7f7;
}

.security-center-layout {
  grid-template-columns: minmax(0, 1fr);
}

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

.security-overview-item,
.security-policy-readonly,
.security-form-note {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.security-overview-item span,
.security-policy-readonly span,
.security-form-note span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.security-overview-item strong,
.security-policy-readonly strong,
.security-form-note strong {
  min-width: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.security-overview-item small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.security-center-note {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text-2);
  background: #fff;
}

.security-center-note strong {
  flex: 0 0 auto;
}

.security-center-note span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.security-abuse-reset-panel {
  display: grid;
  gap: 12px;
}

.security-abuse-reset-result {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 10px;
}

.security-abuse-reset-result article {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.security-abuse-reset-result span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.security-abuse-reset-result strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.review-simulation-layout {
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
}

.review-simulation-guide-card {
  grid-column: 1 / -1;
}

.review-simulation-subpage-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.review-simulation-subpage-tab {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

.review-simulation-subpage-tab.is-active {
  border-color: var(--text);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--text);
}

.review-simulation-subpage-tab strong,
.review-simulation-subpage-tab span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.review-simulation-subpage-tab span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.review-simulation-guide-card,
.review-simulation-status-card,
.review-simulation-operation-card,
.review-simulation-acceptance-card,
.review-simulation-evidence-card,
.review-simulation-accounts-card,
.review-simulation-history-card,
.review-simulation-history-detail-card {
  min-width: 0;
}

.review-simulation-accounts-card {
  grid-column: 1 / -1;
}

.review-simulation-guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.34fr);
  gap: 14px;
  align-items: stretch;
}

.review-simulation-guide-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.review-simulation-state-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.review-simulation-state-label {
  font-size: 20px;
  font-weight: 950;
  letter-spacing: 0;
}

.review-simulation-next-step {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.review-simulation-next-step strong {
  font-size: 12px;
}

.review-simulation-next-step span {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.45;
}

.review-simulation-guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.review-simulation-guide-grid article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.review-simulation-guide-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.review-simulation-guide-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.35;
}

.review-simulation-primary-panel {
  display: grid;
  gap: 10px;
  align-content: center;
  min-width: 0;
  padding: 14px;
  border: 1px solid #d4d4d4;
  border-radius: 7px;
  background: linear-gradient(180deg, #fafafa 0%, #f4f4f4 100%);
}

.review-simulation-primary-panel .review-simulation-primary-action,
.review-simulation-primary-panel .primary-button {
  width: 100%;
  min-height: 42px;
  justify-content: center;
  font-size: 14px;
  font-weight: 950;
}

.review-simulation-primary-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.review-simulation-advanced-settings {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.review-simulation-advanced-settings summary {
  cursor: pointer;
  padding: 11px 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
}

.review-simulation-advanced-settings .review-simulation-form-grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  padding: 0 12px 12px;
}

.review-simulation-advanced-settings .field {
  min-width: 0;
}

.review-simulation-advanced-settings .field input,
.review-simulation-advanced-settings .field select {
  width: 100%;
  min-width: 0;
}

.review-simulation-seed-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.review-simulation-preview-summary {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.review-simulation-preview-intro {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.review-simulation-preview-intro strong {
  font-size: 15px;
  font-weight: 950;
}

.review-simulation-preview-intro span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.review-simulation-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.review-simulation-plan-grid.is-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.review-simulation-plan-grid article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.review-simulation-plan-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.review-simulation-plan-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.4;
}

.review-simulation-plan-grid small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.review-simulation-confirmation-note {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #fed7aa;
  border-radius: 7px;
  background: #fff7ed;
}

.review-simulation-confirmation-note strong {
  font-size: 13px;
  font-weight: 950;
}

.review-simulation-confirmation-note ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.review-simulation-result-details {
  margin-top: 2px;
}

.review-simulation-environment-list {
  display: grid;
  gap: 10px;
}

.review-simulation-environment-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.review-simulation-environment-card[data-state="blocked"] {
  border-color: #fecaca;
  background: #fffafa;
}

.review-simulation-environment-card[data-state="passed"] {
  border-color: #bbf7d0;
  background: #fbfffd;
}

.review-simulation-environment-card header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.review-simulation-environment-card header strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 950;
}

.review-simulation-check-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.review-simulation-check-row {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px;
  border: 1px solid #eeeeee;
  border-radius: 7px;
  background: var(--surface-2);
}

.review-simulation-check-row span,
.review-simulation-check-advanced-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.review-simulation-check-row strong,
.review-simulation-check-advanced-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.review-simulation-resolution {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #c7d2fe;
  border-radius: 7px;
  background: #eef2ff;
}

.review-simulation-resolution strong {
  color: #1e1b4b;
  font-size: 12px;
  font-weight: 950;
}

.review-simulation-resolution ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.review-simulation-resolution li {
  color: #312e81;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.review-simulation-advanced-details {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.review-simulation-advanced-details summary {
  width: fit-content;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.review-simulation-check-advanced-grid {
  display: grid;
  grid-template-columns: minmax(120px, 0.35fr) minmax(0, 1fr);
  gap: 7px 10px;
  min-width: 0;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #eeeeee;
  border-radius: 7px;
  background: #fafafa;
}

@media (max-width: 980px) {
  .review-simulation-guide {
    grid-template-columns: 1fr;
  }

  .review-simulation-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-simulation-check-body {
    grid-template-columns: 1fr;
  }

  .review-simulation-plan-grid,
  .review-simulation-plan-grid.is-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-simulation-advanced-settings .review-simulation-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.review-simulation-account-table {
  min-width: 1180px;
}

.review-simulation-auxiliary-table {
  min-width: 760px;
}

.review-simulation-history-table {
  min-width: 1120px;
}

.review-simulation-form-grid,
.review-simulation-kv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.review-simulation-kv-grid.is-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.review-simulation-kv-grid article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.review-simulation-kv-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.review-simulation-kv-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.35;
}

.review-simulation-acceptance-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.review-simulation-acceptance-overview article,
.review-simulation-history-note,
.review-simulation-diagnostic-list article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.review-simulation-acceptance-overview span,
.review-simulation-acceptance-overview small,
.review-simulation-history-note span,
.review-simulation-history-note small,
.review-simulation-diagnostic-list span,
.review-simulation-diagnostic-list small,
.review-simulation-history-table small {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
}

.review-simulation-acceptance-overview strong,
.review-simulation-history-note strong,
.review-simulation-diagnostic-list strong,
.review-simulation-history-table td strong,
.review-simulation-history-table td small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.review-simulation-diagnostic-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.review-simulation-diagnostic-list article[data-severity="error"] {
  border-color: rgba(220, 38, 38, 0.26);
  background: rgba(254, 242, 242, 0.72);
}

.review-simulation-diagnostic-list article[data-severity="warning"] {
  border-color: rgba(217, 119, 6, 0.26);
  background: rgba(255, 251, 235, 0.72);
}

.review-simulation-history-note {
  margin-bottom: 12px;
}

.review-simulation-history-page-note,
.review-simulation-history-account-empty {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 7px;
  background: rgba(239, 246, 255, 0.72);
}

.review-simulation-history-page-note strong,
.review-simulation-history-page-note span,
.review-simulation-history-account-empty strong,
.review-simulation-history-account-empty span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.review-simulation-history-page-note span,
.review-simulation-history-account-empty span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.review-simulation-history-row-actions {
  gap: 6px;
}

.review-simulation-history-row-actions .secondary-button,
.review-simulation-history-row-actions .danger-button {
  min-height: 30px;
  padding: 6px 9px;
}

.review-simulation-history-detail {
  display: grid;
  gap: 12px;
}

.review-simulation-history-detail-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.review-simulation-history-detail-head > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.review-simulation-history-detail-head strong,
.review-simulation-history-detail-head span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.review-simulation-record-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.review-simulation-record-summary article {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.review-simulation-record-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.review-simulation-record-summary strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.35;
}

.review-simulation-history-detail-head span {
  color: var(--muted);
  font-size: 12px;
}

.review-simulation-actions {
  margin-top: 12px;
}

.review-simulation-secondary-actions {
  margin-top: 0;
}

.review-simulation-account-delivery {
  margin-bottom: 12px;
}

.review-simulation-copy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.review-simulation-account-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.review-simulation-account-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.review-simulation-account-card header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.review-simulation-account-card header > div {
  min-width: 0;
}

.review-simulation-account-card header strong,
.review-simulation-account-card header small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.review-simulation-account-card header small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.review-simulation-account-card-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.review-simulation-account-card-body div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px;
  border: 1px solid #eeeeee;
  border-radius: 7px;
  background: var(--surface-2);
}

.review-simulation-account-card-body span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.review-simulation-account-card-body strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.4;
}

.review-simulation-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-simulation-account-table-details {
  margin-top: 4px;
}

.review-simulation-danger-zone {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 8px;
  background: rgba(254, 242, 242, 0.72);
}

.review-simulation-danger-zone header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.review-simulation-danger-zone p,
.review-simulation-danger-zone small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .review-simulation-account-card-grid,
  .review-simulation-account-card-body,
  .review-simulation-acceptance-overview,
  .review-simulation-subpage-tabs {
    grid-template-columns: 1fr;
  }
}

.review-simulation-subsection {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.review-simulation-subsection > strong {
  color: var(--text);
  font-size: 13px;
}

.review-simulation-account-table td strong,
.review-simulation-account-table td small,
.review-simulation-auxiliary-table td strong,
.review-simulation-auxiliary-table td small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.review-simulation-account-table td,
.review-simulation-auxiliary-table td {
  vertical-align: top;
}

.review-simulation-account-table td small,
.review-simulation-auxiliary-table td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.review-simulation-workspace-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 220px;
}

.review-simulation-workspace-chip {
  display: inline-grid;
  gap: 2px;
  max-width: 210px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.review-simulation-workspace-chip[data-kind="ready"] {
  border-color: rgba(22, 163, 74, 0.28);
  background: rgba(22, 163, 74, 0.08);
}

.review-simulation-workspace-chip[data-kind="pending"] {
  border-color: rgba(217, 119, 6, 0.3);
  background: rgba(217, 119, 6, 0.08);
}

.review-simulation-workspace-chip[data-kind="blocked"] {
  border-color: rgba(220, 38, 38, 0.28);
  background: rgba(220, 38, 38, 0.08);
}

.review-simulation-workspace-chip strong,
.review-simulation-workspace-chip small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.review-simulation-workspace-chip strong {
  font-size: 12px;
}

.review-simulation-workspace-chip small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.review-simulation-empty {
  min-height: 140px;
}

@media (max-width: 1180px) {
  .review-simulation-guide,
  .review-simulation-guide-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.abuse-counter-reset-form [data-required="false"] {
  opacity: 0.55;
}

.abuse-counter-reset-form [data-required="true"] > span::after {
  content: " *";
  color: #dc2626;
}

.security-table {
  min-width: 1180px;
  table-layout: auto;
}

.security-table td {
  vertical-align: top;
}

.security-table td strong,
.security-table td small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.security-table td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.security-launch-layout {
  grid-template-columns: minmax(0, 1fr);
}

.security-launch-metrics .status-badge {
  width: fit-content;
}

.security-readiness-table {
  min-width: 1160px;
}

.security-nginx-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: 12px;
  align-items: start;
}

.security-nginx-form,
.security-nginx-task,
.security-nginx-code {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.security-nginx-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.security-nginx-actions {
  flex-wrap: wrap;
}

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

.security-nginx-task-grid article {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.security-nginx-task-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.security-nginx-task-grid strong {
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.security-nginx-code {
  align-self: stretch;
}

.security-nginx-code-head {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.security-code-block {
  min-height: 220px;
  max-height: 420px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #1f2937;
  background: #f7f7f7;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  white-space: pre;
}

.security-code-block code {
  font: inherit;
}

@media (max-width: 980px) {
  .security-nginx-grid,
  .security-nginx-fields,
  .security-nginx-task-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

.security-policy-field small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.security-form-note {
  margin-bottom: 10px;
}

.captcha-log-card .layout-card-head {
  margin-bottom: 10px;
}

.captcha-log-security-note {
  display: grid;
  grid-template-columns: minmax(92px, 0.16fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.captcha-log-security-note strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.captcha-log-security-note span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.captcha-log-wrap {
  max-width: 100%;
  overflow-x: scroll;
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #b8b8b8 transparent;
}

.captcha-log-table {
  width: 100%;
  min-width: 820px;
  table-layout: fixed;
}

.captcha-log-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.captcha-log-wrap::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 999px;
}

.captcha-log-wrap::-webkit-scrollbar-thumb {
  min-width: 48px;
  border: 2px solid #f3f4f6;
  border-radius: 999px;
  background: #a8a8a8;
  background-clip: padding-box;
}

.captcha-log-wrap::-webkit-scrollbar-thumb:hover {
  background: #8f8f8f;
  background-clip: padding-box;
}

.captcha-log-table th,
.captcha-log-table td {
  white-space: nowrap;
}

.captcha-log-table th:nth-child(1),
.captcha-log-table td:nth-child(1) {
  width: 150px;
}

.captcha-log-table th:nth-child(2),
.captcha-log-table td:nth-child(2) {
  width: 120px;
  white-space: normal;
}

.captcha-log-table th:nth-child(3),
.captcha-log-table td:nth-child(3) {
  width: 120px;
}

.captcha-log-table th:nth-child(4),
.captcha-log-table td:nth-child(4) {
  width: 105px;
}

.captcha-log-table th:nth-child(5),
.captcha-log-table td:nth-child(5) {
  width: 96px;
}

.captcha-log-table th:nth-child(6),
.captcha-log-table td:nth-child(6) {
  width: 176px;
}

.captcha-log-tenant {
  display: block;
  min-width: 0;
}

.captcha-log-tenant strong {
  min-width: 0;
  display: block;
  overflow: visible;
  text-overflow: clip;
  font-size: 13px;
  line-height: 1.3;
}

.captcha-log-tenant .cell-text,
.data-table .captcha-log-tenant .cell-text.is-long {
  max-width: 100%;
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.captcha-code-value {
  display: inline-flex;
  min-width: 56px;
  max-width: 168px;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8f8f8;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}

.captcha-code-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.captcha-code-audit-note {
  max-width: 180px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  white-space: normal;
}

.captcha-code-reveal-button {
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.captcha-code-reveal-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.captcha-code-reveal-button:not(:disabled):hover,
.captcha-code-reveal-button:not(:disabled):focus-visible {
  border-color: #111;
  color: #111;
}

.cell-text {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-text.is-long {
  display: -webkit-box;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.data-table .cell-text.is-long {
  display: block;
  white-space: nowrap;
  overflow-wrap: normal;
  -webkit-line-clamp: unset;
}

.copyable-text {
  cursor: copy;
  border-radius: 5px;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.copyable-text[data-copy-disabled="true"] {
  cursor: default;
}

.copyable-text:hover,
.copyable-text:focus-visible,
.copyable-text.is-copy-popover-ready {
  background: rgba(17, 17, 17, 0.055);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.035);
  outline: none;
}

.copyable-text[data-copy-disabled="true"]:hover,
.copyable-text[data-copy-disabled="true"]:focus-visible,
.copyable-text[data-copy-disabled="true"].is-copy-popover-ready {
  background: rgba(180, 83, 9, 0.08);
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.08);
}

.cell-text.captcha-code-value {
  width: fit-content;
  display: inline-flex;
  white-space: nowrap;
}

.record-copy-text,
.resource-copy-text {
  max-width: 100%;
}

.record-copy-text.is-sub,
.resource-copy-text.is-sub {
  color: inherit;
  font-weight: inherit;
}

.record-main .record-copy-text,
.account-identity .record-copy-text,
.account-record-main .record-copy-text,
.account-field-grid .record-copy-text,
.server-card .resource-copy-text,
.detail-pair .record-copy-text,
.detail-item .record-copy-text,
.captcha-entry-status-card .record-copy-text,
.resource-derived-card .resource-copy-text,
.tenant-license-detail-grid .record-copy-text {
  min-width: 0;
}

.record-main strong .record-copy-text,
.account-record-main strong .record-copy-text,
.server-card-head strong .resource-copy-text,
.captcha-entry-status-card strong .record-copy-text,
.resource-derived-card strong .resource-copy-text,
.tenant-license-detail-grid strong .record-copy-text {
  font-weight: inherit;
}

.floating-long-text-popover {
  position: fixed;
  z-index: 150;
  left: var(--long-text-left, 0);
  top: var(--long-text-top, 0);
  width: var(--long-text-width, 360px);
  max-width: calc(100vw - 24px);
  padding: 11px 12px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px) scale(0.98);
  transform-origin: top center;
  transition: opacity 140ms ease, transform 140ms ease;
}

.floating-long-text-popover.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.floating-long-text-popover[data-placement="top"] {
  transform-origin: bottom center;
}

.floating-long-text-popover::before,
.floating-long-text-popover::after {
  content: "";
  position: absolute;
  left: var(--long-text-arrow-left, 24px);
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(255, 255, 255, 0.98);
}

.floating-long-text-popover::before {
  border: 1px solid var(--line-strong);
}

.floating-long-text-popover::after {
  z-index: 1;
}

.floating-long-text-popover[data-placement="bottom"]::before,
.floating-long-text-popover[data-placement="bottom"]::after {
  top: -6px;
}

.floating-long-text-popover[data-placement="top"]::before,
.floating-long-text-popover[data-placement="top"]::after {
  bottom: -6px;
}

.floating-long-text-value,
.floating-long-text-hint {
  position: relative;
  z-index: 2;
}

.floating-long-text-value {
  max-height: var(--long-text-max-height, 220px);
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.floating-long-text-hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.floating-long-text-popover[data-copy-disabled="true"] {
  border-color: color-mix(in srgb, var(--warning-border) 80%, var(--line-strong));
}

.floating-long-text-popover[data-copy-disabled="true"] .floating-long-text-hint {
  color: var(--warning-text);
  font-weight: 800;
}

.row-check {
  width: 16px;
  height: 16px;
  accent-color: var(--text);
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 140px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface-2);
}

.empty-state strong {
  color: var(--text);
  font-size: 15px;
}

.empty-state span {
  max-width: 520px;
  text-align: center;
}

.empty-state button {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.empty-state button:hover,
.empty-state button:focus-visible {
  border-color: var(--ink);
  box-shadow: var(--focus-ring);
  outline: none;
}

.api-error-card {
  min-height: 220px;
}

.api-error-state {
  border-style: solid;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 250, 0.98));
}

.table-card > .empty-state,
.table-card > .api-error-state {
  align-items: flex-start;
  justify-items: center;
  justify-content: flex-start;
  min-height: 108px;
  padding: 14px;
  text-align: center;
}

.metric-card-loading {
  align-items: center;
  justify-items: center;
}

.side-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
  gap: 12px;
}

.detail-list,
.timeline-list,
.permission-grid {
  display: grid;
  gap: 8px;
}

.detail-item,
.timeline-item,
.permission-card {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.detail-item p,
.timeline-item p,
.permission-card p {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.detail-item .copyable-text {
  color: inherit;
}

.timeline-item {
  grid-template-columns: auto minmax(0, 1fr);
}

.timeline-time {
  width: 52px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  justify-content: flex-end;
  background: rgba(17, 17, 17, 0.08);
}

.drawer {
  position: relative;
  height: 100%;
  width: min(520px, 100vw);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -22px 0 48px rgba(0, 0, 0, 0.16);
  animation: drawerSlideIn 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes drawerSlideIn {
  from {
    opacity: 0.94;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.drawer-head,
.drawer-foot {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.drawer-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.drawer-body {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.drawer-foot {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.48);
  overscroll-behavior: contain;
}

.modal {
  width: min(620px, 100%);
  max-height: min(720px, calc(100vh - 36px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.26);
}

.modal-wide {
	width: min(860px, 100%);
}

.modal[data-modal-form-kind="platformAccount"] {
	width: min(760px, calc(100vw - 36px));
}

.modal[data-modal-form-kind="appId"] {
  width: min(820px, calc(100vw - 24px));
  max-height: min(720px, calc(100vh - 24px));
  overflow: hidden;
}

.modal-head,
.modal-foot {
	border-bottom: 1px solid var(--line);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 56px;
  padding: 12px 14px 12px 18px;
}

.modal-head h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-close-button {
  flex: 0 0 auto;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 999px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.modal-close-button:hover,
.modal-close-button:focus-visible {
  border-color: #111111;
  background: #111111;
  color: #ffffff;
}

.modal.is-submitting .modal-close-button {
  cursor: progress;
  opacity: 0.45;
}

.modal-body {
		min-height: 0;
		overflow: auto;
		display: grid;
	gap: 10px;
		padding: 14px;
	}

.modal.is-submitting .modal-body {
  opacity: 0.72;
  pointer-events: none;
  user-select: none;
}

.modal[data-modal-form-kind="platformAccount"] .modal-body {
		padding: 16px;
	}

.modal[data-modal-form-kind="appId"] .modal-head {
  min-height: 50px;
  padding: 9px 12px 9px 14px;
}

.modal[data-modal-form-kind="appId"] .modal-body {
  padding: 10px 12px;
  overscroll-behavior: contain;
}

.modal-foot {
	padding: 12px 14px;
	border-top: 1px solid var(--line);
	border-bottom: 0;
}

.modal[data-modal-form-kind="platformAccount"] .modal-foot {
	padding: 12px 16px;
}

.modal[data-modal-form-kind="platformAccount"] .modal-foot .button-row {
		justify-content: flex-end;
	}

.modal[data-modal-form-kind="appId"] .modal-foot {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -8px 18px rgba(0, 0, 0, 0.05);
}

.modal[data-modal-form-kind="appId"] .modal-foot .button-row {
  justify-content: flex-end;
}

.modal[data-modal-form-kind="appId"] .modal-submit-button {
  min-height: 34px;
}

.modal-submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.modal-submit-button.is-submitting {
  cursor: progress;
}

.modal-submit-spinner {
  display: none;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: modal-submit-spin 0.72s linear infinite;
}

.modal-submit-button.is-submitting .modal-submit-spinner {
  display: inline-block;
}

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

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

.app-id-multi-field {
  grid-column: 1 / -1;
}

.app-id-multi-field select[multiple],
.edit-form-grid select[multiple] {
  min-height: 112px;
  padding: 7px;
  background-image: none;
}

.app-id-multi-field select[multiple] option,
.edit-form-grid select[multiple] option {
  padding: 6px 8px;
  border-radius: 5px;
}

.searchable-edit-select {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.searchable-edit-select-shell {
  position: relative;
  display: block;
  min-width: 0;
}

.field .searchable-edit-select-input {
  width: 100%;
  padding-right: 38px;
}

.searchable-edit-select-toggle {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 28px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 11px;
}

.searchable-edit-select-toggle:hover,
.searchable-edit-select-toggle:focus-visible {
  background: #f2f2f2;
  outline: none;
}

.searchable-edit-select-menu {
  position: absolute;
  z-index: 60;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 260px;
  overflow: auto;
  display: none;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.searchable-edit-select[data-searchable-open="true"] .searchable-edit-select-menu {
  display: grid;
  gap: 3px;
}

.searchable-edit-select-option {
  width: 100%;
  min-height: 30px;
  padding: 6px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
}

.searchable-edit-select-option:hover,
.searchable-edit-select-option:focus-visible {
  background: #f4f4f5;
  color: var(--text);
  outline: none;
}

.searchable-edit-select-empty {
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
}

.searchable-edit-select[data-searchable-valid="false"] .searchable-edit-select-input {
  border-color: var(--danger);
  box-shadow: 0 0 0 2px rgba(225, 80, 80, 0.08);
}

.app-id-tenant-scope {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.app-id-tenant-scope-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.app-id-tenant-scope-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-id-tenant-scope-head small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
}

.app-id-tenant-scope-select {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.app-id-tenant-scope-select input,
.app-id-tenant-scope-select select {
  min-width: 0;
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font-size: 12px;
}

.app-id-tenant-scope-select input {
  padding: 6px 8px;
}

.app-id-tenant-scope-select select {
  padding: 0 8px;
}

.app-id-tenant-scope-select input:focus-visible,
.app-id-tenant-scope-select select:focus-visible {
  border-color: var(--text);
  outline: none;
  box-shadow: 0 0 0 3px rgba(23, 23, 23, 0.09);
}

.app-id-tenant-scope-readonly .app-id-tenant-scope-head small {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.app-id-tenant-readonly-list {
  min-width: 0;
  max-height: 118px;
  overflow: auto;
  display: grid;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
  overscroll-behavior: contain;
}

.app-id-tenant-readonly-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.app-id-tenant-readonly-item strong,
.app-id-tenant-readonly-item small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.app-id-tenant-readonly-item strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.app-id-tenant-readonly-item small {
  color: var(--muted);
  font-size: 12px;
}

.app-id-tenant-readonly-item .status-badge {
  justify-self: end;
  grid-row: 1 / span 2;
}

.app-id-tenant-empty {
  grid-column: 1 / -1;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.app-id-tenant-empty[hidden] {
  display: none;
}

.app-id-switch-field {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.app-id-switch-field .field-hint {
  grid-column: 1 / -1;
}

.app-id-edit-switch {
  align-self: center;
}

.server-pool-create {
  display: grid;
  gap: 12px;
}

.server-pool-create-grid {
  gap: 8px 10px;
}

.server-pool-create-grid .create-field {
  align-content: start;
  gap: 4px;
}

.create-section-title {
  grid-column: 1 / -1;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(250, 250, 250, 0.92);
}

.create-section-title strong {
  font-size: 13px;
  line-height: 1.3;
}

.create-section-title span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.server-pool-create-grid .field-hint {
  min-height: 0;
  line-height: 1.35;
}

.server-pool-create-grid .field-error:empty {
  min-height: 0;
}

.server-pool-create-grid .editor-field-wide textarea {
  min-height: 72px;
}

.license-form-grid {
  gap: 7px 10px;
}

.license-form-grid .create-field {
  align-content: start;
  gap: 4px;
}

.license-form-grid .field-hint {
  min-height: 0;
  line-height: 1.35;
}

.license-form-grid .field-error:empty {
  min-height: 0;
}

.license-form-grid .editor-field-wide textarea {
  min-height: 66px;
}

.tenant-ip-whitelist-create-form {
  gap: 8px 10px;
}

.tenant-ip-whitelist-create-form .create-field {
  align-content: start;
  gap: 4px;
}

.tenant-ip-whitelist-create-form .editor-field-wide textarea {
  min-height: 72px;
}

.tenant-ip-whitelist-create-form .field-hint,
.tenant-ip-whitelist-create-form .tenant-admin-password-copy small {
  min-height: 0;
  line-height: 1.35;
}

.tenant-ip-whitelist-guidance {
  grid-column: 1 / -1;
  padding: 10px 12px;
}

.tenant-ip-whitelist-temporary {
  min-height: 64px;
}

.app-id-create-grid {
  grid-template-columns: minmax(0, 1fr) minmax(132px, 180px);
  gap: 6px 10px;
}

.app-id-edit-grid {
  grid-template-columns: minmax(0, 1fr) minmax(132px, 180px);
  gap: 6px 10px;
}

.app-id-create-grid .create-field,
.app-id-edit-grid .field {
	align-content: start;
	gap: 3px;
}

.app-id-autogen-guidance {
  grid-column: 1 / -1;
  gap: 2px;
  padding: 8px 10px;
}

.app-id-autogen-guidance span,
.app-id-autogen-guidance small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.app-id-create-grid [data-create-field-wrap="platform"],
.app-id-edit-grid [data-edit-field-wrap="platform"],
.app-id-edit-grid [data-edit-field-wrap="status"] {
  max-width: 180px;
}

.app-id-create-grid .app-id-multi-field,
.app-id-edit-grid [data-edit-field-wrap="tenant_ids"] {
  grid-column: 1 / -1;
}

.app-id-create-grid .field-hint,
.app-id-edit-grid .field-hint {
  min-height: 0;
  line-height: 1.28;
}

.app-id-create-grid .field-error:empty,
.app-id-edit-grid .field-error:empty {
  display: none;
}

.app-id-create-grid .field input,
.app-id-create-grid .field select,
.app-id-edit-grid .field input,
.app-id-edit-grid .field select {
  min-height: 32px;
}

.app-id-create-grid .app-id-switch-field .field-hint,
.app-id-edit-grid .app-id-switch-field .field-hint,
.app-id-edit-grid [data-edit-field-wrap="allow_workspace_switch"] .field-hint,
.app-id-edit-grid [data-edit-field-wrap="allow_default_tenant_join"] .field-hint,
.app-id-edit-grid [data-edit-field-wrap="department_enabled"] .field-hint,
.app-id-edit-grid [data-edit-field-wrap="require_real_name"] .field-hint,
.app-id-edit-grid [data-edit-field-wrap="require_phone_verification"] .field-hint,
.app-id-edit-grid [data-edit-field-wrap="access_diagnostics_overlay_enabled"] .field-hint {
  font-size: 10.5px;
}

.platform-account-create-grid {
	grid-template-columns: repeat(2, minmax(240px, 1fr));
	gap: 12px;
}

.platform-account-create-grid .create-field {
	align-content: start;
	min-height: 78px;
	gap: 5px;
}

.platform-account-create-grid .field input,
.platform-account-create-grid .field select {
	min-height: 38px;
	border-radius: 7px;
}

.platform-account-create-grid .password-input-shell input {
	min-height: 38px;
}

.platform-account-guidance {
	grid-column: 1 / -1;
	grid-template-columns: minmax(0, 1fr);
	align-items: start;
	padding: 10px 12px;
	border-color: rgba(15, 23, 42, 0.12);
	background: #f8fafc;
}

.platform-account-guidance strong {
	color: var(--text);
	font-size: 13px;
	font-weight: 800;
	line-height: 1.35;
}

.platform-account-guidance span {
	color: #52525b;
	line-height: 1.5;
}

.tenant-resource-create {
	display: grid;
	gap: 12px;
}

.create-guidance {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 245, 245, 0.86));
}

.create-guidance strong {
  font-size: 14px;
}

.create-guidance span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.create-guidance .resource-link-button {
  grid-column: 2;
  grid-row: 1;
}

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

.footer-panel-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.footer-panel-card-wide {
  grid-column: 1 / -1;
  min-height: auto;
}

.footer-panel-card strong {
  font-size: 14px;
  color: var(--text);
}

.footer-panel-card span,
.footer-panel-card small,
.footer-panel-card label {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.footer-panel-card label {
  display: flex;
  gap: 8px;
  align-items: center;
}

.footer-panel-card input {
  margin: 0;
}

.footer-panel-card button {
  justify-self: start;
  min-height: 30px;
  padding: 0 11px;
}

.footer-panel-steps {
  display: grid;
  gap: 6px;
}

.account-settings-panel {
  display: grid;
  gap: 12px;
}

.account-settings-hero {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #f6f6f6 100%);
}

.account-settings-avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #111111;
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
}

.account-settings-title {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.account-settings-title span,
.account-settings-section-head span {
  color: var(--muted);
  font-size: 12px;
}

.account-settings-title strong {
  overflow: hidden;
  color: var(--text);
  font-size: 20px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-settings-title small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-settings-logout {
  min-height: 34px;
  padding: 0 14px;
}

.account-settings-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.account-settings-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-settings-section-head strong {
  color: var(--text);
  font-size: 14px;
}

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

.account-field-grid article,
.account-security-grid article {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.account-field-grid span,
.account-security-grid span {
  color: var(--muted);
  font-size: 12px;
}

.account-field-grid strong,
.account-security-grid strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-field-grid .status-badge,
.account-security-grid .status-badge,
.account-security-stack .status-badge {
  width: fit-content;
  max-width: 100%;
  justify-self: start;
  align-self: center;
}

.account-permission-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-permission-list span {
  max-width: 100%;
  overflow: hidden;
  padding: 6px 9px;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  background: #f7f7f7;
  color: #171717;
  font-size: 12px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast-stack {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  width: min(360px, calc(100vw - 28px));
  max-height: min(560px, calc(100vh - 112px));
  pointer-events: none;
}

.toast-overflow-note {
  max-width: 100%;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
  pointer-events: none;
  backdrop-filter: blur(10px);
}

.toast {
  position: relative;
  z-index: var(--toast-layer);
  width: 100%;
  max-height: 142px;
  min-height: 54px;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) 26px;
  align-items: start;
  gap: 10px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--toast-border, rgba(17, 17, 17, 0.12));
  border-left: 3px solid var(--toast-accent, #111111);
  border-radius: 7px;
  background: var(--toast-bg, rgba(255, 255, 255, 0.97));
  color: var(--text);
  box-shadow:
    0 16px 34px rgba(15, 23, 42, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.72) inset;
  overflow: hidden;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  transform-origin: right bottom;
  transition:
    opacity 180ms ease,
    transform 180ms cubic-bezier(0.25, 0.75, 0.6, 0.98),
    box-shadow 180ms ease;
  backdrop-filter: blur(14px);
}

.toast-stack:not(:hover):not(:focus-within):not(.is-expanded) .toast:nth-last-of-type(n + 3) {
  display: none;
}

.toast-stack:hover .toast,
.toast-stack:focus-within .toast,
.toast-stack.is-expanded .toast {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.toast-stack:hover .toast:hover,
.toast-stack:focus-within .toast:focus-within,
.toast-stack.is-expanded .toast:hover {
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.78) inset;
}

.toast-stack:hover .toast-overflow-note,
.toast-stack:focus-within .toast-overflow-note,
.toast-stack.is-expanded .toast-overflow-note {
  display: none;
}

.toast[data-type="success"] {
  --toast-accent: #16a34a;
  --toast-border: var(--success-border);
  --toast-bg: color-mix(in srgb, var(--success-bg) 54%, #ffffff);
}

.toast[data-type="warning"] {
  --toast-accent: #d97706;
  --toast-border: var(--warning-border);
  --toast-bg: color-mix(in srgb, var(--warning-bg) 62%, #ffffff);
}

.toast[data-type="error"] {
  --toast-accent: #dc2626;
  --toast-border: var(--danger-border);
  --toast-bg: color-mix(in srgb, var(--danger-bg) 58%, #ffffff);
}

.toast[data-type="info"],
.toast[data-type="message"] {
  --toast-accent: #2563eb;
  --toast-border: var(--neutral-border);
  --toast-bg: color-mix(in srgb, #eff6ff 64%, #ffffff);
}

.toast-status-dot {
  width: 8px;
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--toast-accent, #111111);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--toast-accent, #111111) 12%, transparent);
}

.toast-copy {
  min-width: 0;
  max-height: 116px;
  display: grid;
  gap: 2px;
  overflow: auto;
  scrollbar-width: thin;
}

.toast-type-label {
  color: var(--toast-accent, var(--muted));
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}

.toast strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

.toast p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.toast-close {
  width: 26px;
  height: 26px;
  min-height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
}

.toast-close:hover:not(:disabled),
.toast-close:focus-visible {
  background: rgba(17, 17, 17, 0.07);
  color: var(--text);
  outline: none;
}

.toast-close svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

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

@media (prefers-reduced-motion: reduce) {
  .submenu-list,
  .chevron,
  .toast {
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1180px) {
  .gateway-shell {
    grid-template-columns: 288px minmax(0, 1fr);
  }

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

  .command-layout,
  .timeline-layout,
  .matrix-layout,
  .accounts-layout,
  .tenant-admin-accounts-layout,
  .google-auth-layout,
  .analytics-layout,
  .captcha-control-layout,
  .captcha-preview-layout,
  .master-detail-layout,
  .review-layout,
  .registration-layout,
  .tenant-resource-layout,
  .tenant-onboarding-layout,
  .editor-layout,
  .tool-layout {
    grid-template-columns: 1fr;
  }

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

  .metric-grid {
    height: 202px;
    min-height: 202px;
  }

  .tenant-admin-list-panel,
  .tenant-admin-detail-panel {
    min-height: 0;
  }

  .tenant-admin-account-list {
    max-height: 500px;
  }

  .gateway-main[data-page-id="tenantAdmins"] .workbench-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .gateway-main[data-page-id="tenantAdmins"] .panel-actions,
  .gateway-main[data-page-id="tenantAdmins"] .action-row {
    justify-content: flex-start;
  }

  .gateway-main[data-page-id="tenantAdmins"] .action-row {
    padding-left: 0;
    border-left: 0;
  }

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

  .captcha-test-flow,
  .captcha-entry-filter-grid,
  .captcha-entry-status-grid,
  .captcha-image-grid,
  .security-overview-grid,
  .security-policy-grid,
  .client-preview-grid,
  .registration-impact-list.is-inline,
  .account-inline-security .account-security-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .gateway-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .gateway-sidebar {
    position: static;
    height: auto;
    min-height: 0;
  }

  .gateway-main {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .gateway-header {
    position: static;
    grid-template-columns: 1fr;
    padding: 14px 16px;
  }

  .gateway-content {
    padding: 16px;
  }

  .security-overview-grid,
  .security-policy-grid {
    grid-template-columns: 1fr;
  }

  .resource-probe-inline {
    grid-template-columns: 1fr;
  }

  .resource-probe-inline-actions {
    justify-content: flex-start;
  }

  .google-auth-notice,
  .google-auth-policy,
  .google-auth-setup-content {
    grid-template-columns: 1fr;
  }

  .google-auth-qr {
    width: 132px;
    height: 132px;
  }

  .security-center-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .toast-stack {
    right: 12px;
    bottom: 12px;
    width: min(340px, calc(100vw - 24px));
    max-height: min(420px, calc(100vh - 88px));
  }

  .metric-grid,
  .filter-grid {
    grid-template-columns: minmax(0, 230px);
  }

  .filter-grid.tenant-admin-filter-grid {
    width: 100%;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  .tenant-admin-access-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .tenant-admin-account-table-head {
    display: none;
  }

  .tenant-admin-account-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    padding: 12px;
  }

  .tenant-admin-account-cell {
    align-content: start;
  }

  .tenant-admin-account-cell::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
  }

  .tenant-admin-account-cell.is-account {
    grid-column: 1 / -1;
  }

  .tenant-admin-account-list {
    max-height: 520px;
  }

  .tenant-admin-empty-state,
  .tenant-admin-empty-state.is-detail {
    min-height: 230px;
    padding: 22px 14px;
  }

  .tenant-admin-detail-section .inline-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .tenant-admin-detail-section .inline-section-head span {
    text-align: left;
    white-space: normal;
  }

  .tenant-admin-filter-grid .field[data-filter-field="tenant"] .select-menu {
    width: 100%;
    max-width: 100%;
  }

  .metric-grid {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .gateway-main[data-page-id="tenantAdmins"] .metric-grid {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bulk-bar,
  .panel-heading,
  .workbench-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .registration-impact-list.is-inline,
  .account-inline-security .account-security-stack {
    grid-template-columns: 1fr;
  }

  .panel-actions {
    justify-content: flex-start;
  }

  .detail-grid,
  .review-media-grid,
  .tool-grid,
  .account-field-grid,
  .policy-grid,
  .captcha-image-grid,
  .captcha-command-card,
  .captcha-toggle-panel,
	  .captcha-policy-options,
	  .captcha-entry-filter-grid,
	  .captcha-entry-status-grid,
	  .captcha-entry-facts,
	  .captcha-log-security-note,
	  .scene-grid,
	  .captcha-test-flow,
	  .client-preview-grid,
	  .platform-account-create-grid,
	  .provider-stack {
	    grid-template-columns: 1fr;
	  }

  .secret-control,
  .policy-key-row {
    grid-template-columns: 1fr;
  }

  .panel-actions,
  .action-row {
    justify-content: flex-start;
  }

  .action-row {
    padding-left: 0;
    border-left: 0;
  }

  .panel-heading .button-row {
    justify-content: flex-start;
  }

  .metric-card {
    height: auto;
  }

  .drawer {
    width: 100vw;
  }

  .filter-grid.captcha-log-filter-grid {
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-grid.captcha-log-filter-grid .field[data-filter-field="tenant"] {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .filter-grid.captcha-log-filter-grid {
    grid-template-columns: 1fr;
  }

  .filter-grid.captcha-log-filter-grid .field[data-filter-field="tenant"] {
    grid-column: auto;
  }
}

button.primary-button:not(:disabled),
.gateway-content button.primary-button:hover:not(:disabled),
.gateway-content button.primary-button:focus-visible:not(:disabled),
.gateway-content button.primary-button:active:not(:disabled),
.gateway-header button.primary-button:hover:not(:disabled),
.gateway-header button.primary-button:focus-visible:not(:disabled),
.gateway-header button.primary-button:active:not(:disabled),
.drawer button.primary-button:hover:not(:disabled),
.drawer button.primary-button:focus-visible:not(:disabled),
.drawer button.primary-button:active:not(:disabled),
.modal button.primary-button:hover:not(:disabled),
.modal button.primary-button:focus-visible:not(:disabled),
.modal button.primary-button:active:not(:disabled) {
  border-color: var(--accent) !important;
  background: linear-gradient(180deg, #202020 0%, #0f0f0f 100%) !important;
  color: #ffffff !important;
}

.gateway-content button.primary-button:hover:not(:disabled),
.gateway-content button.primary-button:focus-visible:not(:disabled),
.gateway-header button.primary-button:hover:not(:disabled),
.gateway-header button.primary-button:focus-visible:not(:disabled),
.drawer button.primary-button:hover:not(:disabled),
.drawer button.primary-button:focus-visible:not(:disabled),
.modal button.primary-button:hover:not(:disabled),
.modal button.primary-button:focus-visible:not(:disabled) {
  background: linear-gradient(180deg, #2a2a2a 0%, #131313 100%) !important;
  color: #ffffff !important;
}

button.primary-button *,
button.primary-button:hover *,
button.primary-button:focus-visible * {
  color: inherit !important;
}

.menu-button.is-active:hover,
.footer-nav-button.is-active:hover,
.account-record-item.is-selected:hover,
.account-record-item.is-selected:focus-visible,
.tool-item.is-active:hover,
.tool-item.is-active:focus-visible {
  border-color: var(--text);
  background: var(--text);
  color: #ffffff;
}

.menu-button.is-active:hover .menu-label,
.footer-nav-button.is-active:hover span:last-child,
.tool-item.is-active:hover .status-badge {
  color: #ffffff;
}

/* Login page: centered card over a paper-shader inspired black field. */
.gateway-login-root {
  min-height: 100vh;
  background: #000000;
}

.gateway-login-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  padding: clamp(18px, 4vw, 56px);
  overflow: hidden;
  perspective: 1100px;
  perspective-origin: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.038) 1px, transparent 1px) 0 0 / 54px 54px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px) 0 0 / 54px 54px,
    #000000;
  animation: loginGridGlide 2.2s linear infinite;
}

.gateway-login-shell::before {
  content: "";
  position: absolute;
  inset: -24%;
  z-index: -2;
  background:
    conic-gradient(from 214deg at 48% 50%, #000000 0deg, #171717 78deg, #3a3a3a 146deg, #f2f2f2 190deg, #242424 238deg, #000000 324deg, #000000 360deg),
    linear-gradient(135deg, #000000 0%, #111111 36%, #323232 57%, #050505 100%);
  filter: blur(36px) saturate(0.8);
  opacity: 0.94;
  transform: translate3d(0, 0, 0) rotate(0deg) scale(1.05);
  animation: loginShaderFlow 3.1s ease-in-out infinite alternate;
}

.gateway-login-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.16) 0 1px, transparent 1.6px) 0 0 / 34px 34px,
    linear-gradient(115deg, rgba(255, 255, 255, 0.12), transparent 28%, rgba(255, 255, 255, 0.08) 52%, transparent 78%);
  opacity: 0.3;
  mask-image: radial-gradient(ellipse at center, #000000 0%, rgba(0, 0, 0, 0.72) 42%, transparent 78%);
  animation: loginPaperDrift 1.6s linear infinite;
}

.login-shader-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 44% 78% at -2% 12%, #efefef 0%, #bdbdbd 16%, #616161 34%, #070707 61%, transparent 78%),
    radial-gradient(ellipse 88% 64% at 18% 106%, #eeeeee 0%, #b4b4b4 24%, #5f5f5f 48%, #090909 78%),
    radial-gradient(ellipse 70% 92% at 88% 10%, #3a3a3a 0%, #171717 50%, #020202 100%);
}

.gateway-login-shell.has-login-shader {
  background: #000000;
  animation: none;
}

.gateway-login-shell.has-login-shader::before {
  display: none;
}

.gateway-login-shell.has-login-shader::after {
  display: none;
}

.gateway-login-card {
  --login-rotate-x: 0deg;
  --login-rotate-y: 0deg;
  --login-shift-x: 0px;
  --login-shift-y: 0px;
  --login-glare-x: 72%;
  --login-glare-y: 18%;
  position: relative;
  z-index: 2;
  align-self: center;
  justify-self: center;
  width: min(392px, calc(100vw - 32px));
  margin: 0;
  display: grid;
  gap: 20px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.086), rgba(255, 255, 255, 0.026) 45%, rgba(255, 255, 255, 0.06)),
    rgba(6, 6, 6, 0.82);
  color: #ffffff;
  box-shadow:
    0 36px 120px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px);
  transform:
    translate3d(var(--login-shift-x), var(--login-shift-y), 0)
    rotateX(var(--login-rotate-x))
    rotateY(var(--login-rotate-y));
  transform-style: preserve-3d;
  transition:
    box-shadow 180ms ease,
    border-color 180ms ease;
  will-change: transform;
}

.gateway-login-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  pointer-events: none;
  border-radius: 15px;
  background:
    linear-gradient(126deg, rgba(255, 255, 255, 0.12), transparent 32%, rgba(255, 255, 255, 0.035) 67%, transparent);
  opacity: 0.5;
  transform: translateZ(1px);
  transition: opacity 180ms ease;
}

.gateway-login-card[data-tilting="true"] {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow:
    0 42px 128px rgba(0, 0, 0, 0.76),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.17),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

.gateway-login-card[data-tilting="true"]::before {
  opacity: 0.58;
}

.gateway-login-card .login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 2px;
}

.gateway-login-card .login-brand > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ffffff;
  color: #070707;
  font-weight: 950;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 28px rgba(0, 0, 0, 0.32);
}

.gateway-login-card .login-brand div,
.gateway-login-card .login-title {
  display: grid;
  gap: 3px;
}

.gateway-login-card .login-brand strong,
.gateway-login-card .login-title h1,
.gateway-login-card .field > span {
  color: #ffffff;
}

.gateway-login-card .login-brand strong {
  font-size: 16px;
}

.gateway-login-card .login-title {
  gap: 4px;
  padding-top: 4px;
}

.gateway-login-card .login-title h1 {
  font-size: 24px;
  line-height: 1.2;
}

.gateway-login-card .login-brand small,
.gateway-login-card .login-title span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 700;
}

.gateway-login-card .login-form {
  display: grid;
  gap: 14px;
}

.gateway-login-card .field input,
.gateway-login-card .field textarea,
.gateway-login-card .field select {
  border-color: rgba(255, 255, 255, 0.17);
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  caret-color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  min-height: 38px;
  border-radius: 8px;
}

.gateway-login-card .password-input-shell input {
  padding-right: 50px;
}

.gateway-login-card .password-toggle-button {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
}

.gateway-login-card .password-toggle-button:hover,
.gateway-login-card .password-toggle-button:focus-visible,
.gateway-login-card .password-toggle-button[aria-pressed="true"] {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.gateway-login-card .remember-account-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  margin-top: -2px;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  user-select: none;
}

.gateway-login-card .remember-account-option input {
  grid-row: 1 / span 2;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #ffffff;
  cursor: pointer;
}

.gateway-login-card .remember-account-option span {
  color: #ffffff;
  font-size: 13px;
  font-weight: 820;
  line-height: 1.2;
}

.gateway-login-card .remember-account-option small {
  grid-column: 2;
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  font-weight: 680;
  line-height: 1.25;
}

.gateway-login-card .field input::placeholder,
.gateway-login-card .field textarea::placeholder {
  color: rgba(255, 255, 255, 0.36);
}

.gateway-login-card .field input:hover,
.gateway-login-card .field textarea:hover,
.gateway-login-card .field select:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background-color: rgba(255, 255, 255, 0.105);
}

.gateway-login-card .field input:focus,
.gateway-login-card .field input:focus-visible,
.gateway-login-card .field textarea:focus,
.gateway-login-card .field textarea:focus-visible,
.gateway-login-card .field select:focus,
.gateway-login-card .field select:focus-visible {
  border-color: rgba(255, 255, 255, 0.62);
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  -webkit-text-fill-color: #ffffff;
}

.gateway-login-card .field input:-webkit-autofill,
.gateway-login-card .field input:-webkit-autofill:hover,
.gateway-login-card .field input:-webkit-autofill:focus {
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow:
    0 0 0 1000px #151515 inset,
    0 0 0 3px rgba(255, 255, 255, 0.1);
  -webkit-text-fill-color: #ffffff;
  caret-color: #ffffff;
  transition: background-color 9999s ease-out;
}

.gateway-login-card .login-submit,
.gateway-login-card button.primary-button.login-submit:not(:disabled),
.gateway-login-card button.primary-button.login-submit:hover:not(:disabled),
.gateway-login-card button.primary-button.login-submit:focus-visible:not(:disabled),
.gateway-login-card button.primary-button.login-submit:active:not(:disabled) {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.84) !important;
  border-radius: 11px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%) !important;
  color: #050505 !important;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.14);
}

.gateway-login-card .login-submit::before {
  content: "";
  position: absolute;
  inset: -32% auto -32% -38%;
  width: 20%;
  pointer-events: none;
  transform: skewX(-24deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  filter: blur(1px);
  animation: loginButtonSheen 4s ease-in-out infinite;
}

.gateway-login-card .login-submit::after {
  display: none;
}

.gateway-login-card .login-submit:hover:not(:disabled),
.gateway-login-card .login-submit:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 20px 42px rgba(0, 0, 0, 0.5),
    0 0 0 3px rgba(255, 255, 255, 0.14);
}

.gateway-login-card .login-error {
  max-height: 72px;
  overflow: hidden;
  border: 1px solid rgba(248, 113, 113, 0.4);
  border-radius: 7px;
  background: rgba(127, 29, 29, 0.3);
  color: #fecaca;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  animation: loginErrorEnter 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
  will-change: max-height, opacity, transform, padding;
}

.gateway-login-card .login-error.is-leaving {
  animation: loginErrorLeave 220ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes loginShaderFlow {
  0% {
    transform: translate3d(-7%, -4%, 0) rotate(-10deg) scale(1.08);
  }
  50% {
    transform: translate3d(5%, 3%, 0) rotate(7deg) scale(1.14);
  }
  100% {
    transform: translate3d(3%, -6%, 0) rotate(12deg) scale(1.1);
  }
}

@keyframes loginGridGlide {
  to {
    background-position:
      54px 54px,
      54px 54px,
      0 0;
  }
}

@keyframes loginPaperDrift {
  to {
    background-position:
      34px 34px,
      120px 0;
  }
}

@keyframes loginButtonSheen {
  0%,
  42% {
    left: -62%;
    opacity: 0;
  }
  55% {
    opacity: 0.72;
  }
  78%,
  100% {
    left: 118%;
    opacity: 0;
  }
}

@keyframes loginErrorEnter {
  0% {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    transform: translate3d(0, -8px, 0);
  }
  100% {
    max-height: 72px;
    opacity: 1;
    padding-top: 10px;
    padding-bottom: 10px;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes loginErrorLeave {
  0% {
    max-height: 72px;
    opacity: 1;
    padding-top: 10px;
    padding-bottom: 10px;
    transform: translate3d(0, 0, 0);
  }
  100% {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    transform: translate3d(0, -8px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gateway-login-shell::before,
  .gateway-login-shell::after {
    animation: none;
  }

  .gateway-login-card .login-submit::before,
  .gateway-login-card .login-error {
    animation: none;
  }

  .gateway-login-card .login-submit::before {
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .legal-docs-app-picker,
  .legal-docs-publish-shell,
  .legal-docs-active-overview,
  .legal-docs-manifest-grid,
  .legal-docs-sync-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .gateway-login-shell {
    padding: 12px;
  }

  .gateway-login-card {
    width: min(420px, calc(100vw - 24px));
    padding: 22px;
  }
}

@media (max-width: 760px) {
  .access-config-row-grid,
  .access-config-issue-list article,
  .access-config-endpoint-item,
  .access-config-modal-grid,
  .access-config-flow,
  .access-config-default-note,
  .access-config-next-step {
    grid-template-columns: minmax(0, 1fr);
  }

  .access-config-status-grid,
  .access-config-action-grid,
  .access-config-json-grid,
  .access-config-tabs {
    grid-template-columns: minmax(0, 1fr);
  }

  .access-config-endpoint-actions {
    justify-content: flex-start;
  }
}
.resilience-layout {
  grid-template-columns: minmax(0, 1fr);
}

.resilience-tenant-grid,
.recovery-gate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.resilience-tenant-card,
.recovery-gate-grid article {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
}

.resilience-tenant-card > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.resilience-tenant-card dl,
.recovery-impact dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
}

.resilience-tenant-card dl div,
.recovery-impact dl div {
  min-width: 0;
}

.resilience-tenant-card dt,
.recovery-impact dt,
.recovery-gate-grid span {
  color: var(--muted);
  font-size: 12px;
}

.resilience-tenant-card dd,
.recovery-impact dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.resilience-evidence-boundary,
.resilience-evidence-error {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid color-mix(in srgb, var(--amber) 42%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-muted) 92%, var(--amber) 8%);
}

.resilience-evidence-boundary strong,
.resilience-evidence-error strong {
  flex: 0 0 auto;
}

.resilience-evidence-boundary span,
.resilience-evidence-error span,
.resilience-evidence-error small {
  min-width: 0;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.resilience-evidence-error {
  display: grid;
  border-color: color-mix(in srgb, var(--red) 45%, var(--line));
  background: color-mix(in srgb, var(--surface-muted) 94%, var(--red) 6%);
}

.resilience-evidence-error strong {
  color: var(--red);
}

.resilience-evidence-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.resilience-evidence-summary > div,
.resilience-evidence-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-muted);
}

.resilience-evidence-summary > div {
  display: grid;
  gap: 7px;
  padding: 14px;
}

.resilience-evidence-summary span,
.resilience-evidence-summary small,
.resilience-evidence-card header span,
.resilience-evidence-card dt {
  color: var(--muted);
  font-size: 12px;
}

.resilience-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.resilience-evidence-card {
  display: grid;
  align-content: start;
  gap: 13px;
  padding: 17px;
}

.resilience-evidence-card header {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.resilience-evidence-card header > div {
  min-width: 0;
}

.resilience-evidence-card h3 {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.resilience-evidence-card > p {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.resilience-evidence-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.resilience-evidence-card dl > div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.resilience-evidence-card dd {
  min-width: 0;
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.resilience-evidence-badge {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  flex: 0 0 auto;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.resilience-evidence-badge.is-ready {
  border-color: color-mix(in srgb, var(--green) 55%, var(--line));
  color: var(--green);
}

.resilience-evidence-badge.is-degraded {
  border-color: color-mix(in srgb, var(--amber) 58%, var(--line));
  color: var(--amber);
}

.resilience-evidence-badge.is-blocked {
  border-color: color-mix(in srgb, var(--red) 55%, var(--line));
  color: var(--red);
}

.resilience-evidence-badge.is-not-configured,
.resilience-evidence-badge.is-unknown {
  background: color-mix(in srgb, var(--surface-muted) 82%, var(--line) 18%);
}

.resilience-evidence-blocker,
.resilience-evidence-next {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-muted) 86%, var(--line) 14%);
}

.resilience-evidence-blocker {
  border-left: 3px solid var(--red);
}

.resilience-evidence-next {
  border-left: 3px solid var(--accent);
}

.resilience-evidence-blocker span,
.resilience-evidence-next span {
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.recovery-tenant-list button.account-record-item {
  width: 100%;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
}

.recovery-workbench,
.backup-retention-shell {
  min-width: 0;
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.recovery-stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.recovery-stepper button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-muted);
}

.recovery-stepper button.is-active {
  border-color: var(--brand);
  box-shadow: inset 0 -3px 0 var(--brand);
  color: var(--brand);
  font-weight: 700;
}

.recovery-step-panel {
  min-height: 280px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.recovery-point-list {
  display: grid;
  gap: 10px;
  border: 0;
  padding: 0;
}

.recovery-point-list label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.recovery-point-list label.is-selected,
.recovery-point-list label:focus-within {
  border-color: var(--brand);
}

.recovery-point-list small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

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

.recovery-confirmation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 5%, var(--surface));
}

.recovery-confirmation > h4,
.recovery-confirmation > p,
.recovery-confirmation > small,
.recovery-confirmation > .chat-notice,
.recovery-confirmation > .recovery-risk-confirmation,
.recovery-confirmation > .is-wide {
  grid-column: 1 / -1;
}

.recovery-confirmation > h4,
.recovery-confirmation > p {
  margin: 0;
}

.recovery-form-grid label,
.recovery-confirmation label {
  display: grid;
  gap: 6px;
}

.recovery-confirmation [hidden] {
  display: none;
}

.recovery-confirmation .recovery-risk-confirmation {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.recovery-confirmation .recovery-risk-confirmation input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
}

.recovery-form-grid .is-wide {
  grid-column: 1 / -1;
}

.recovery-form-grid input,
.recovery-form-grid select,
.recovery-form-grid textarea,
.recovery-confirmation input,
.recovery-confirmation select {
  width: 100%;
  min-height: 40px;
}

.recovery-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.recovery-timeline {
  display: grid;
  gap: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.recovery-timeline article {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  min-height: 52px;
}

.recovery-timeline article > span {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 18px 0 -4px var(--line);
}

.recovery-timeline small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.recovery-table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

.backup-retention-shell > *,
.recovery-workbench > *,
.resource-config-section,
.resource-section-head {
  min-width: 0;
}

.recovery-table-wrap table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.recovery-table-wrap th,
.recovery-table-wrap td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.backup-capacity-section,
.backup-manifest-section,
.backup-cleanup-preview,
.backup-cleanup-job {
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.backup-capacity-disclaimer {
  margin: 14px 0;
  line-height: 1.6;
}

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

.backup-capacity-card,
.backup-manifest-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface-muted) 68%, var(--surface));
}

.backup-capacity-card.has-advisory {
  border-color: color-mix(in srgb, #d97706 42%, var(--line));
  background: linear-gradient(145deg, color-mix(in srgb, #f59e0b 7%, var(--surface)), var(--surface));
}

.backup-capacity-card > header,
.backup-manifest-card > header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.backup-capacity-card header > div,
.backup-manifest-card header > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.backup-capacity-card header small,
.backup-manifest-card header small,
.backup-preview-grid span,
.backup-preview-grid small {
  color: var(--muted);
  font-size: 12px;
}

.backup-capacity-card header strong,
.backup-manifest-card header strong,
.backup-manifest-card header span {
  overflow-wrap: anywhere;
}

.backup-capacity-progress {
  height: 8px;
  margin: 15px 0;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 70%, transparent);
}

.backup-capacity-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #14b8a6);
}

.has-advisory .backup-capacity-progress span {
  background: linear-gradient(90deg, #d97706, #f59e0b);
}

.backup-capacity-facts,
.backup-manifest-card dl,
.backup-job-facts {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin: 0;
}

.backup-capacity-facts div,
.backup-manifest-card dl div,
.backup-job-facts div {
  min-width: 0;
}

.backup-capacity-facts dt,
.backup-manifest-card dt,
.backup-job-facts dt {
  color: var(--muted);
  font-size: 12px;
}

.backup-capacity-facts dd,
.backup-manifest-card dd,
.backup-job-facts dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-weight: 750;
  line-height: 1.45;
}

.backup-capacity-advisory {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 11px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--line) 32%, transparent);
}

.backup-capacity-advisory[data-tone="warning"] {
  color: #92400e;
  background: color-mix(in srgb, #f59e0b 13%, var(--surface));
}

.backup-capacity-advisory span,
.backup-capacity-advisory small {
  overflow-wrap: anywhere;
}

.backup-manifest-card {
  display: grid;
  gap: 14px;
}

.backup-manifest-card.is-selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 14%, transparent);
}

.backup-manifest-card details {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--line) 26%, transparent);
}

.backup-manifest-card summary {
  cursor: pointer;
  font-weight: 750;
}

.backup-manifest-card details dl {
  margin-top: 12px;
}

.backup-manifest-card > button {
  justify-self: start;
}

.backup-gate-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.backup-gate {
  min-width: 0;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 750;
}

.backup-gate i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
}

.backup-gate.is-pass {
  color: #047857;
  border-color: color-mix(in srgb, #10b981 28%, var(--line));
  background: color-mix(in srgb, #10b981 8%, var(--surface));
}

.backup-gate.is-pass i {
  background: #10b981;
}

.backup-gate.is-block {
  color: #b45309;
  border-color: color-mix(in srgb, #f59e0b 32%, var(--line));
  background: color-mix(in srgb, #f59e0b 10%, var(--surface));
}

.backup-gate.is-block i {
  background: #f59e0b;
}

.backup-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.backup-preview-grid article {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-muted);
}

.backup-preview-grid strong {
  overflow-wrap: anywhere;
  font-size: 17px;
}

.backup-blocker-list {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid color-mix(in srgb, #dc2626 28%, var(--line));
  border-radius: 11px;
  color: #991b1b;
  background: color-mix(in srgb, #ef4444 7%, var(--surface));
}

.backup-blocker-list ul {
  display: grid;
  gap: 7px;
  margin: 9px 0 0;
  padding-left: 20px;
}

.backup-blocker-list li {
  overflow-wrap: anywhere;
}

.backup-blocker-list code {
  display: inline-block;
  max-width: 100%;
  margin-left: 8px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.backup-cleanup-job {
  border-left: 4px solid var(--line);
}

.backup-cleanup-job.is-info {
  border-left-color: #0284c7;
}

.backup-cleanup-job.is-warning {
  border-left-color: #d97706;
}

.backup-cleanup-job.is-success {
  border-left-color: #059669;
}

.backup-cleanup-job.is-danger {
  border-left-color: #dc2626;
}

.backup-job-facts {
  margin: 14px 0;
}

.backup-lifecycle-blocked {
  padding-bottom: 30px;
  background:
    radial-gradient(circle at 88% -12%, rgba(217, 119, 6, 0.14), transparent 38%),
    var(--surface);
}

.backup-lifecycle-blocked h3 {
  margin: 24px 0 8px;
}

.backup-lifecycle-blocked > p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.7;
}

.bootstrap-publish-layout {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
}

.bootstrap-publish-layout > .layout-card {
  min-width: 0;
  max-width: 100%;
}

.bootstrap-command-card,
.bootstrap-editor-card,
.bootstrap-diff-card,
.bootstrap-confirm-card,
.bootstrap-job-card,
.bootstrap-history-card,
.bootstrap-blocked-card {
  grid-column: 1 / -1;
}

.bootstrap-editor-card {
  overflow: hidden;
}

.bootstrap-command-card {
  overflow: hidden;
  background:
    radial-gradient(circle at 88% -12%, rgba(14, 116, 144, 0.17), transparent 36%),
    linear-gradient(145deg, #ffffff 0%, #f7fbfb 58%, #eff8f7 100%);
}

.bootstrap-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 26px;
  align-items: center;
  padding: 22px 0 18px;
}

.bootstrap-hero > div:first-child {
  min-width: 0;
}

.bootstrap-eyebrow {
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.bootstrap-hero h3 {
  max-width: 760px;
  margin: 8px 0 10px;
  font-size: clamp(23px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.bootstrap-hero p,
.bootstrap-section-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.7;
}

.bootstrap-source-orbit {
  position: relative;
  min-height: 138px;
  display: grid;
  place-items: center;
}

.bootstrap-source-orbit::before {
  content: "已签名";
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15, 118, 110, 0.36);
  border-radius: 50%;
  background: #ffffff;
  color: #0f766e;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  box-shadow: 0 18px 50px rgba(15, 118, 110, 0.14);
}

.bootstrap-source-orbit::after {
  content: "";
  position: absolute;
  inset: 9px 22px;
  border: 1px dashed rgba(15, 118, 110, 0.34);
  border-radius: 50%;
}

.bootstrap-source-orbit span {
  position: absolute;
  z-index: 1;
  padding: 7px 10px;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 999px;
  background: #ffffff;
  color: #134e4a;
  font-size: 11px;
  font-weight: 850;
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.09);
}

.bootstrap-source-orbit span:nth-child(1) {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.bootstrap-source-orbit span:nth-child(2) {
  right: 0;
  bottom: 8px;
}

.bootstrap-source-orbit span:nth-child(3) {
  bottom: 8px;
  left: 0;
}

.bootstrap-scope-bar {
  display: grid;
  grid-template-columns: minmax(200px, 1.4fr) repeat(5, minmax(130px, 1fr));
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.bootstrap-scope-bar > *,
.bootstrap-scope-bar label {
  min-width: 0;
  display: grid;
  gap: 5px;
  align-content: center;
  margin: 0;
  padding: 12px;
  border-right: 1px solid rgba(15, 118, 110, 0.15);
}

.bootstrap-scope-bar > *:last-child {
  border-right: 0;
}

.bootstrap-scope-bar span,
.bootstrap-metadata-grid label > span,
.bootstrap-endpoint-table label > span,
.bootstrap-rollback-chip > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.bootstrap-scope-bar strong,
.bootstrap-scope-bar small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bootstrap-scope-bar small {
  color: var(--muted);
  font-size: 9px;
}

.bootstrap-scope-bar select {
  min-width: 0;
  width: 100%;
  min-height: 38px;
  font-weight: 800;
}

.bootstrap-status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 25px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f4f4f5;
  color: #3f3f46;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.bootstrap-status-pill.is-success {
  border-color: #99f6e4;
  background: #ecfdf5;
  color: #065f46;
}

.bootstrap-status-pill.is-info {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #075985;
}

.bootstrap-status-pill.is-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.bootstrap-status-pill.is-danger {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #9f1239;
}

.bootstrap-allowlist-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 16px;
  align-items: center;
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid #d6d3d1;
  border-left: 4px solid #0f766e;
  border-radius: 10px;
  background: #fafaf9;
}

.bootstrap-allowlist-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.bootstrap-endpoint-table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-bottom: 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.bootstrap-endpoint-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.bootstrap-endpoint-table th {
  padding: 10px 12px;
  background: #f6f7f7;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-align: left;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bootstrap-endpoint-table td {
  min-width: 0;
  padding: 12px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.bootstrap-endpoint-table td:nth-child(1) {
  width: 17%;
}

.bootstrap-endpoint-table td:nth-child(2) {
  width: 30%;
}

.bootstrap-endpoint-table td:nth-child(3) {
  width: 39%;
}

.bootstrap-endpoint-table label,
.bootstrap-endpoint-contract {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.bootstrap-endpoint-table td > label + label,
.bootstrap-endpoint-contract label + label {
  margin-top: 8px;
}

.bootstrap-endpoint-table input,
.bootstrap-endpoint-table select {
  width: 100%;
  min-height: 37px;
  font-size: 12px;
}

.bootstrap-icon-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
  color: #9f1239;
  font-size: 19px;
}

.bootstrap-metadata-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.bootstrap-metadata-grid label {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.bootstrap-metadata-grid .is-wide {
  grid-column: 1 / -1;
}

.bootstrap-metadata-grid input,
.bootstrap-metadata-grid textarea {
  width: 100%;
}

.bootstrap-metadata-grid textarea {
  min-height: 92px;
  resize: vertical;
}

.bootstrap-metadata-grid small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.bootstrap-rollback-chip {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(180px, auto) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fff7ed;
}

.bootstrap-rollback-chip strong,
.bootstrap-rollback-chip small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bootstrap-rollback-chip small {
  color: #9a3412;
}

.bootstrap-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.bootstrap-diff-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.bootstrap-diff-summary article {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafafa;
}

.bootstrap-diff-summary span,
.bootstrap-diff-summary strong {
  display: block;
}

.bootstrap-diff-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.bootstrap-diff-summary strong {
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.bootstrap-diff-summary .is-added {
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.bootstrap-diff-summary .is-changed {
  border-color: #bae6fd;
  background: #f0f9ff;
}

.bootstrap-diff-summary .is-removed {
  border-color: #fecdd3;
  background: #fff1f2;
}

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

.bootstrap-diff-columns > section,
.bootstrap-change-list {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfbfb;
}

.bootstrap-diff-columns h4,
.bootstrap-change-list h4 {
  margin: 0 0 10px;
}

.bootstrap-endpoint-snapshot {
  display: grid;
  gap: 8px;
}

.bootstrap-endpoint-snapshot article {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.bootstrap-endpoint-snapshot span,
.bootstrap-endpoint-snapshot small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.bootstrap-endpoint-snapshot strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.bootstrap-change-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.bootstrap-change-list article {
  min-width: 0;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.bootstrap-change-list code {
  min-width: 0;
  padding: 7px 9px;
  border-radius: 7px;
  background: #f1f5f4;
  color: #334155;
  font-size: 10px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.bootstrap-confirm-flow {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  gap: 8px;
  align-items: center;
  margin: 14px 0;
}

.bootstrap-confirm-flow span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fafafa;
  font-size: 10px;
  font-weight: 850;
  text-align: center;
}

.bootstrap-confirm-flow span.is-done {
  border-color: #99f6e4;
  background: #ecfdf5;
  color: #065f46;
}

.bootstrap-confirm-flow i {
  height: 1px;
  background: var(--line);
}

.bootstrap-confirmation {
  margin-bottom: 0;
}

.bootstrap-job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 14px 0;
}

.bootstrap-job-meta > span {
  min-width: 0;
  padding: 6px 9px;
  border-radius: 999px;
  background: #f4f4f5;
  font-size: 10px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.bootstrap-job-meta button {
  margin-left: auto;
}

.bootstrap-source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.bootstrap-source-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-top-width: 3px;
  border-radius: 11px;
  background: #ffffff;
}

.bootstrap-source-card.is-success {
  border-top-color: #0f766e;
}

.bootstrap-source-card.is-warning {
  border-top-color: #d97706;
}

.bootstrap-source-card.is-danger {
  border-top-color: #be123c;
}

.bootstrap-source-card header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.bootstrap-source-card header > span:first-child {
  font-size: 13px;
  font-weight: 900;
}

.bootstrap-source-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 12px 0 0;
}

.bootstrap-source-card dl div {
  min-width: 0;
  padding: 7px;
  border-radius: 7px;
  background: #f7f7f7;
}

.bootstrap-source-card dt,
.bootstrap-source-card dd {
  overflow-wrap: anywhere;
}

.bootstrap-source-card dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.bootstrap-source-card dd {
  margin: 3px 0 0;
  font-size: 10px;
  font-weight: 850;
}

.bootstrap-source-card > small {
  display: block;
  margin-top: 9px;
  color: #9f1239;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.bootstrap-repair-panel {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #fdba74;
  border-radius: 12px;
  background:
    radial-gradient(circle at 94% -15%, rgba(251, 146, 60, 0.18), transparent 34%),
    #fffaf5;
}

.bootstrap-repair-panel h4 {
  margin: 5px 0 4px;
  color: #9a3412;
  font-size: 15px;
}

.bootstrap-repair-panel p {
  margin: 0;
  color: #7c2d12;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.65;
}

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

.bootstrap-repair-fields label {
  min-width: 0;
  display: grid;
  gap: 5px;
  margin: 0;
}

.bootstrap-repair-fields label > span {
  color: #9a3412;
  font-size: 10px;
  font-weight: 850;
}

.bootstrap-repair-fields .is-wide {
  grid-column: 1 / -1;
}

.bootstrap-history-table {
  min-width: 760px;
}

.bootstrap-history-table td > small {
  display: block;
  max-width: 360px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.bootstrap-blocked-card {
  max-width: 860px;
  margin: 5vh auto 0;
  text-align: center;
  background:
    radial-gradient(circle at 50% -20%, rgba(217, 119, 6, 0.16), transparent 42%),
    #ffffff;
}

.bootstrap-blocked-card h3 {
  margin: 20px 0 8px;
  font-size: 24px;
}

.bootstrap-blocked-card > p {
  max-width: 650px;
  margin: 0 auto 18px;
  color: var(--muted);
  line-height: 1.7;
}

.bootstrap-blocked-visual {
  width: min(340px, 100%);
  display: grid;
  grid-template-columns: 74px repeat(3, 1fr);
  gap: 8px;
  align-items: center;
  margin: 26px auto 0;
}

.bootstrap-blocked-visual span {
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #111827;
  color: #ffffff;
  font-size: 18px;
  font-weight: 950;
}

.bootstrap-blocked-visual i {
  height: 14px;
  border-radius: 999px;
  background: #f59e0b;
  opacity: 0.35;
}

@media (max-width: 980px) {
  .resilience-tenant-grid,
  .resilience-evidence-grid,
  .recovery-gate-grid,
  .backup-capacity-grid,
  .backup-manifest-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .backup-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recovery-stepper {
    grid-template-columns: 1fr;
  }

  .bootstrap-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .bootstrap-source-orbit {
    width: min(380px, 100%);
    margin: 0 auto;
  }

  .bootstrap-scope-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bootstrap-scope-bar > * {
    border-bottom: 1px solid rgba(15, 118, 110, 0.15);
  }

  .bootstrap-diff-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .bootstrap-source-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bootstrap-change-list article {
    grid-template-columns: minmax(0, 1fr);
  }

  .bootstrap-change-list article > span {
    display: none;
  }
}

@media (max-width: 760px) {
  .resilience-tenant-grid,
  .resilience-evidence-grid,
  .resilience-evidence-summary,
  .recovery-gate-grid,
  .recovery-form-grid,
  .resilience-tenant-card dl,
  .recovery-impact dl,
  .backup-capacity-grid,
  .backup-manifest-list,
  .backup-capacity-facts,
  .backup-manifest-card dl,
  .backup-job-facts,
  .backup-preview-grid,
  .backup-cleanup-preview .recovery-confirmation {
    grid-template-columns: 1fr;
  }

  .resilience-evidence-boundary,
  .resilience-evidence-card header,
  .resilience-evidence-card dl > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .resilience-evidence-card dd {
    text-align: left;
  }

  .backup-cleanup-preview .recovery-confirmation > * {
    grid-column: auto;
  }

  .backup-capacity-section,
  .backup-manifest-section,
  .backup-cleanup-preview,
  .backup-cleanup-job {
    padding: 14px;
  }

  .backup-manifest-card > button,
  .backup-cleanup-preview button,
  .backup-cleanup-job > button {
    width: 100%;
  }

  .recovery-point-list label {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .recovery-point-list label > :last-child {
    grid-column: 2;
  }

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

  .recovery-actions button {
    flex: 1 1 100%;
  }

  .bootstrap-scope-bar,
  .bootstrap-metadata-grid,
  .bootstrap-diff-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .bootstrap-scope-bar > *,
  .bootstrap-scope-bar label {
    border-right: 0;
  }

  .bootstrap-metadata-grid .is-wide {
    grid-column: auto;
  }

  .bootstrap-repair-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .bootstrap-repair-fields .is-wide {
    grid-column: auto;
  }

  .bootstrap-allowlist-note,
  .bootstrap-rollback-chip {
    grid-template-columns: minmax(0, 1fr);
  }

  .bootstrap-confirm-flow {
    grid-template-columns: minmax(0, 1fr);
  }

  .bootstrap-confirm-flow i {
    width: 1px;
    height: 14px;
    margin: 0 auto;
  }

  .bootstrap-editor-actions {
    justify-content: stretch;
  }

  .bootstrap-editor-actions button {
    width: 100%;
  }

  .bootstrap-job-meta button {
    width: 100%;
    margin-left: 0;
  }

  .bootstrap-source-card dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .bootstrap-endpoint-table {
    min-width: 0;
    display: block;
  }

  .bootstrap-endpoint-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .bootstrap-endpoint-table tbody,
  .bootstrap-endpoint-table tr,
  .bootstrap-endpoint-table td {
    width: 100%;
    display: block;
  }

  .bootstrap-endpoint-table tr {
    padding: 12px;
    border-top: 1px solid var(--line);
  }

  .bootstrap-endpoint-table tr:first-child {
    border-top: 0;
  }

  .bootstrap-endpoint-table td {
    padding: 7px 0;
    border: 0;
  }

  .bootstrap-endpoint-table td:last-child {
    display: flex;
    justify-content: flex-end;
  }

  .bootstrap-history-table {
    min-width: 640px;
  }
}
