:root {
  --brand: #315bd7;
  --brand-hover: #254bc2;
  --brand-soft: #eef3ff;
  --ink: #172033;
  --text: #344054;
  --muted: #667085;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --page: #f6f8fb;
  --surface: #ffffff;
  --success: #14804a;
  --success-soft: #e9f8ef;
  --warning: #b54708;
  --warning-soft: #fff4e5;
  --danger: #c4320a;
  --danger-soft: #fff0eb;
  --purple: #6941c6;
  --purple-soft: #f4f0ff;
  --shadow: 0 12px 32px rgba(16, 24, 40, 0.14);
  --radius: 8px;
  --shell-max: 1720px;
  --content-max: 1340px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background: var(--page);
  font-size: 14px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
[role="tab"],
[data-action],
[role="button"] {
  cursor: pointer;
}

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

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="tab"]:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(49, 91, 215, 0.24);
  outline-offset: 2px;
}

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

h1 {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 22px;
  line-height: 30px;
}

h2 {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 16px;
  line-height: 24px;
}

h3 {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 14px;
}

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

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 8px 12px;
  color: #fff;
  background: var(--brand);
  border-radius: 6px;
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

.icon {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.app-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  color: #fff;
  background: #172332;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.header-main {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
}

.brand {
  min-width: 150px;
  display: flex;
  align-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.1px;
  text-decoration: none;
}

.brand:hover {
  color: #fff;
}

.brand:focus-visible {
  border-radius: 4px;
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.header-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.16);
}

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

.tenant-switcher {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: #e4e7ec;
  background: rgba(255, 255, 255, 0.06);
}

.tenant-switcher:not(:disabled):hover,
.tenant-switcher[aria-expanded="true"] {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

.tenant-switcher:disabled {
  cursor: default;
  opacity: 1;
}

.tenant-switcher-static {
  padding-right: 10px;
}

.tenant-switcher strong {
  max-width: 260px;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-switcher-icon {
  width: 18px;
  height: 18px;
}

.tenant-switcher-chevron {
  width: 14px;
  height: 14px;
  transform: rotate(90deg);
  transition: transform 0.16s ease;
}

.tenant-switcher[aria-expanded="true"] .tenant-switcher-chevron {
  transform: rotate(-90deg);
}

.tenant-code {
  color: #98a2b3;
  font-size: 12px;
}

.tenant-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  min-width: 320px;
  max-width: min(440px, calc(100vw - 32px));
  overflow: hidden;
  padding: 6px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.18);
}

.tenant-menu[hidden] {
  display: none;
}

.tenant-option {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.tenant-option:hover,
.tenant-option.active {
  background: var(--brand-soft);
}

.tenant-option:disabled {
  cursor: wait;
  opacity: 0.65;
}

.tenant-option-check {
  display: inline-grid;
  place-items: center;
}

.tenant-option-check .icon {
  width: 16px;
  height: 16px;
  color: var(--brand);
}

.tenant-option-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-menu-state {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
}

.tenant-menu-state.danger {
  color: var(--danger);
}

.header-spacer {
  flex: 1;
}

.header-action-link {
  width: 36px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  flex: none;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #e4e7ec;
  text-decoration: none;
}

.header-action-link:hover {
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.header-action-link:focus-visible {
  outline: 3px solid rgba(217, 228, 255, 0.36);
  outline-offset: 2px;
}

.header-action-link .icon {
  width: 20px;
  height: 20px;
}

.user-menu-wrap {
  position: relative;
}

.avatar-button {
  width: 36px;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: #213d91;
  background: transparent;
}

.avatar-button,
.avatar {
  border-radius: 50%;
}

.avatar-button {
  background: #d9e4ff;
  font-size: 12px;
  font-weight: 700;
}

.avatar {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: none;
  color: #213d91;
  background: #d9e4ff;
  font-size: 12px;
  font-weight: 700;
}

.user-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  width: 220px;
  overflow: visible;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.18);
}

.user-popover[hidden] {
  display: none;
}

.user-popover-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.user-popover-profile .avatar {
  width: 42px;
  height: 42px;
}

.user-identity {
  min-width: 0;
  flex: 1;
}

.user-identity strong,
.user-account {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-account {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.user-popover-divider {
  height: 1px;
  background: var(--line);
}

.user-popover-item {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border: 0;
  color: var(--text);
  background: #fff;
  text-align: left;
}

.user-popover-item:hover {
  background: #f7f9fc;
}

.user-popover > .user-popover-item:last-child {
  border-radius: 0 0 7px 7px;
}

.user-popover-item.danger {
  color: var(--danger);
}

.language-menu-wrap {
  position: relative;
}

.language-submenu {
  position: absolute;
  top: 0;
  right: 100%;
  z-index: 61;
  width: 180px;
  display: none;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.18);
}

.language-submenu:not([hidden]) {
  display: block;
}

.language-option {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  color: var(--text);
  background: #fff;
  text-align: left;
}

.language-option:hover,
.language-option.active {
  color: var(--brand);
  background: #f5f8ff;
}

.tabs-shell {
  position: fixed;
  top: 58px;
  bottom: 0;
  left: 0;
  z-index: 35;
  width: 232px;
  overflow-y: auto;
  padding: 18px 12px;
  background: #fff;
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
}

.top-tabs {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.top-tab {
  position: relative;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  color: #475467;
  background: transparent;
  font-weight: 600;
  text-align: left;
  transition: color 180ms ease, background 180ms ease;
}

.top-tab:hover {
  color: var(--brand);
  background: #f7f9fd;
}

.top-tab.active {
  color: var(--brand);
  background: var(--brand-soft);
}

.top-tab.active::after {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 3px;
  content: "";
  background: var(--brand);
  border-radius: 0 3px 3px 0;
}

.system-nav-group {
  display: grid;
  gap: 3px;
}

.system-nav-toggle .disclosure-chevron {
  margin-left: auto;
}

.disclosure-chevron {
  transition: transform 180ms ease;
}

[aria-expanded="true"] > .disclosure-chevron {
  transform: rotate(90deg);
}

.system-subnav {
  display: grid;
  gap: 2px;
  margin-left: 16px;
  padding: 2px 0 4px 10px;
  border-left: 1px solid var(--line);
}

.system-subnav[hidden] {
  display: none;
}

.system-subtab {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  text-align: left;
}

.system-subtab:hover,
.system-subtab.active {
  color: var(--brand);
  background: #f5f8ff;
}

.workspace {
  width: auto;
  min-height: 100vh;
  margin-left: 232px;
  padding: 88px 28px 52px;
}

.workspace.workspace-standalone {
  margin-left: 0;
}

.page {
  width: min(var(--content-max), 100%);
  display: grid;
  gap: 16px;
  margin: 0 auto;
}

.page-header {
  min-height: 52px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 2px;
}

.page-header h1,
.page-header h2,
.page-header p {
  margin-bottom: 0;
}

.caption,
.help-text,
.muted {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.page-actions,
.inline-actions,
.toolbar,
.filters,
.button-row,
.form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.form-action-spacer {
  flex: 1;
}

.btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text);
  background: #fff;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.btn:hover {
  border-color: #98a2b3;
  background: #f9fafb;
}

.btn.primary {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
}

.btn.primary:hover {
  border-color: var(--brand-hover);
  background: var(--brand-hover);
}

.btn.warning {
  border-color: #f59e0b;
  color: #fff;
  background: #f59e0b;
}

.btn.warning:hover {
  border-color: #d97706;
  background: #d97706;
}

.btn.danger {
  border-color: #f5b4a1;
  color: var(--danger);
  background: #fff;
}

.btn.link {
  min-height: auto;
  padding: 0;
  border: 0;
  color: var(--brand);
  background: transparent;
  box-shadow: none;
}

.btn.link.danger {
  color: var(--danger);
}

.btn.icon-only {
  width: 34px;
  padding: 0;
}

.card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.card + .card {
  margin-top: 0;
}

.card-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}

.card-head h2,
.card-head p {
  margin-bottom: 0;
}

.card-body {
  padding: 18px;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid #c7d7fe;
  border-radius: 6px;
  color: #2949a8;
  background: #f5f8ff;
}

.confirm-notice {
  margin-top: 14px;
}

.confirm-scope-content {
  min-width: 0;
  flex: 1;
}

.confirm-scope-categories {
  max-height: 104px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-right: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.confirm-scope-category {
  max-width: 100%;
  padding: 2px 8px;
  overflow: hidden;
  border: 1px solid #c7d7fe;
  border-radius: 999px;
  color: var(--brand);
  background: #fff;
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

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

.form-row,
.field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row > span:first-child,
.field label {
  color: var(--text);
  font-weight: 600;
}

.field,
.schema-input,
.schema-textarea,
.search-input,
input,
select,
textarea {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
}

input,
select,
textarea,
.field,
.schema-input,
.schema-textarea {
  width: 100%;
  padding: 7px 10px;
}

label.field,
label.form-row,
div.field,
div.form-row {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

textarea,
.schema-textarea {
  min-height: 92px;
  resize: vertical;
}

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

.system-config-card .card-body {
  padding: 22px;
}

.system-config-head {
  min-height: 54px;
}

.system-config-head h2 {
  font-size: 16px;
}

.system-scope-badge {
  color: var(--muted);
  background: #f2f4f7;
}

.system-settings-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.db-type-field,
.db-port-field {
  grid-column: span 1;
}

.db-host-field {
  grid-column: span 4;
}

.database-source-card {
  grid-column: span 2;
}

.db-credential-field {
  grid-column: span 3;
}

.database-source-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfe;
}

.database-source-card h3 {
  margin: 0;
  font-size: 15px;
}

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

.system-db-grid .form-actions {
  grid-column: 1 / -1;
}

.system-config-actions {
  justify-content: space-between;
  margin: 8px -22px -22px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px);
  background: #fbfcfe;
}

.system-config-action-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.system-config-action-primary {
  justify-content: flex-end;
}

.tenant-jdbc-card {
  margin-top: 16px;
}

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

.tenant-jdbc-grid > .form-row:nth-child(1) {
  grid-column: span 2;
}

.tenant-jdbc-grid > .form-row:nth-child(2) {
  grid-column: span 4;
}

.tenant-jdbc-grid > .form-row:nth-child(3),
.tenant-jdbc-grid > .form-row:nth-child(4) {
  grid-column: span 3;
}

.tenant-jdbc-advanced,
.tenant-jdbc-air2-options,
.tenant-jdbc-grid .system-config-actions {
  grid-column: 1 / -1;
}

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

.tenant-jdbc-air2-options[hidden] { display: none; }
.tenant-jdbc-tls-control {
  display: flex;
  align-items: center;
  flex: 1;
  min-height: 36px;
}

.tenant-jdbc-advanced {
  margin: 8px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.llm-config-grid > .llm-base-url {
  grid-column: 1 / -1;
}

.llm-api-key {
  grid-column: span 3;
}

.llm-model {
  grid-column: span 2;
}

.llm-max-tokens {
  grid-column: span 1;
}

.llm-tuning-title {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.llm-tuning-title ~ .form-row {
  grid-column: span 2;
}

.llm-config-grid .form-actions {
  grid-column: 1 / -1;
}

.definition-grid {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 14px 20px;
  align-items: center;
}

.definition-grid .label {
  color: var(--muted);
}

.definition-grid .value {
  min-width: 0;
  color: var(--ink);
  font-weight: 500;
}

.code,
code,
.result-body,
.code-panel {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.result-body,
.code-panel {
  width: 100%;
  min-height: 150px;
  max-height: 520px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  color: #eef2ff;
  background: #0b1020;
  border: 1px solid #18233d;
  border-radius: 6px;
  padding: 14px;
  clip-path: inset(0 round 6px);
  scrollbar-color: #64748b #0b1020;
  scrollbar-width: thin;
}

.result-body::-webkit-scrollbar,
.code-panel::-webkit-scrollbar {
  width: 8px;
}

.result-body::-webkit-scrollbar-track,
.code-panel::-webkit-scrollbar-track {
  background: #0b1020;
}

.result-body::-webkit-scrollbar-thumb,
.code-panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #64748b;
}

.pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--text);
  background: #f2f4f7;
  font-size: 12px;
  font-weight: 600;
}

.pill.success,
.status-ok {
  color: var(--success);
  background: var(--success-soft);
}

.pill.warning,
.status-warn {
  color: var(--warning);
  background: var(--warning-soft);
}

.pill.danger,
.status-error {
  color: var(--danger);
  background: var(--danger-soft);
}

.pill.blue {
  color: #2949a8;
  background: var(--brand-soft);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f9fafb;
}

.segmented button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
}

.segmented button.active {
  color: var(--brand);
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
  font-weight: 600;
}

.ui-tabs-page {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 34px;
  border-bottom: 1px solid var(--line);
}

.ui-tabs-page button {
  min-height: 58px;
  padding: 0 2px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 22px;
  font-weight: 700;
  line-height: 30px;
  cursor: pointer;
}

.ui-tabs-page button.active {
  color: var(--ink);
}

.ui-tabs-underline {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--line);
}

.ui-tabs-underline button {
  position: relative;
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 600;
  cursor: pointer;
}

.ui-tabs-underline button.active {
  color: var(--brand);
}

.ui-tabs-underline button.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  content: "";
  border-radius: 3px 3px 0 0;
  background: var(--brand);
}

.asset-type-tabs {
  flex: 1;
  align-self: stretch;
  border-bottom: 0;
}

.asset-type-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.asset-type-count {
  min-width: 26px;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--muted);
  background: #f2f4f7;
  font-size: 12px;
  line-height: 18px;
}

.asset-type-tabs button.active .asset-type-count {
  color: var(--brand);
  background: var(--brand-soft);
}

.filter-select {
  width: var(--filter-select-width, 140px);
  min-width: var(--filter-select-width, 140px);
  max-width: var(--filter-select-width, 140px);
  height: 38px;
  padding-top: 7px;
  padding-bottom: 7px;
  color: var(--ink);
}

.filter-bar-fields > .filter-select {
  flex: 0 0 var(--filter-select-width, 140px);
}

.filter-select.is-default,
.filter-select option[value=""] {
  color: var(--muted);
}

.filter-select option:not([value=""]) {
  color: var(--ink);
}

.filter-bar,
.filter-bar-fields,
.filter-bar-actions {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.filter-bar {
  flex-wrap: wrap;
}

.filter-bar-start {
  justify-content: flex-start;
}

.filter-bar-fields {
  flex-wrap: wrap;
}

.filter-bar-actions {
  flex: none;
}

.filter-bar-end {
  justify-content: flex-end;
}

.filter-bar-end .filter-bar-fields {
  margin-left: auto;
}

.summary-card {
  padding: 16px 18px;
}

.summary-card .value {
  margin-top: 3px;
  color: var(--ink);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.asset-summary-card {
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.asset-summary-card:hover,
.asset-summary-card.active,
.asset-summary-card:focus-visible {
  border-color: #9db4f0;
  box-shadow: 0 4px 14px rgba(49, 91, 215, 0.08);
}

.asset-summary-card.active .muted,
.asset-summary-card.active .value {
  color: var(--brand);
}

.asset-summary-card .status-dot.success {
  color: var(--success);
  background: currentColor;
}

.asset-summary-card .status-dot.warning {
  color: var(--warning);
  background: currentColor;
}

.asset-summary-card .status-dot.danger {
  color: var(--danger);
  background: currentColor;
}

.asset-summary-card .status-dot.info {
  color: var(--brand);
  background: currentColor;
}

.summary-sync {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.summary-sync .sync-task-link {
  margin-left: auto;
  font-size: 12px;
}

.list-state-bar {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  color: #315bd7;
  background: #f4f7ff;
  border-bottom: 1px solid #dbe5ff;
  font-size: 12px;
}

.list-state-bar[hidden] {
  display: none;
}

.list-state-bar.error,
.inline-error {
  color: var(--danger);
  background: #fff5f5;
}

.inline-error {
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 12px;
}

.inline-error[hidden] {
  display: none;
}

.inline-error.compact {
  padding: 0;
  background: transparent;
}

.action-dropdown {
  position: relative;
}

.action-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 25;
  width: 220px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  box-shadow: var(--shadow);
}

.action-menu[hidden] {
  display: none;
}

.action-menu button {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.action-menu button:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.action-menu-label {
  padding: 5px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.action-menu-divider {
  height: 1px;
  margin: 5px 0;
  background: var(--line);
}

.table-shell {
  min-width: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  clip-path: inset(0 round 7px);
}

.list-scroll {
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

.list-scroll,
.dataset-overview-panel {
  scrollbar-width: thin;
}

.fixed-list {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}

.fixed-list-head,
.fixed-list-foot {
  flex: none;
}

.fixed-list-body {
  flex: 1;
}

.list-table-scroll {
  flex: 1;
}

.list-table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.list-footer {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.list-footer-spacer {
  flex: 1;
}

.cursor-pager .btn {
  min-width: 64px;
  min-height: 32px;
  padding-right: 10px;
  padding-left: 10px;
  font-size: 13px;
}

.cursor-pager-position {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.cursor-pager-page {
  width: 48px;
  height: 32px;
  padding: 0 6px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  text-align: center;
}

.cursor-pager-page:disabled {
  color: var(--muted);
  background: #f9fafb;
}

.cursor-pager-total {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.cursor-pager.busy {
  cursor: progress;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: #475467;
  background: #f9fafb;
  font-size: 12px;
  font-weight: 700;
}

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

tbody tr:hover td {
  background: #f8faff;
}

.tool-layout,
.tool-explorer,
.api-debug-layout,
.row-auth-layout,
.permission-layout,
.theme-layout,
.asset-layout {
  min-height: 510px;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
}

.tool-layout,
.tool-explorer {
  grid-template-columns: 270px minmax(0, 1fr);
}

.overview-page .tool-explorer {
  height: auto;
  min-height: 0;
  overflow: visible;
}

.overview-debug-card {
  overflow: visible;
}

.overview-page .tool-list {
  border-bottom-left-radius: calc(var(--radius) - 1px);
}

.overview-page .tool-debug-main {
  border-bottom-right-radius: calc(var(--radius) - 1px);
}

.api-debug-layout {
  grid-template-columns: 280px minmax(0, 1fr);
  height: min(680px, calc(100vh - 340px));
  min-height: 500px;
}

.api-debug-global-config {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.api-debug-global-config h2 {
  flex: none;
  margin: 0;
  font-size: 14px;
}

.api-debug-global-config > .caption {
  margin-left: auto;
}

.api-debug-sidebar {
  min-width: 0;
  overflow-y: auto;
  padding: 14px 12px 24px;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
  scrollbar-width: thin;
}

.api-debug-group + .api-debug-group {
  margin-top: 14px;
}

.api-debug-group-title {
  margin: 0 0 5px;
}

.api-debug-group-toggle {
  width: 100%;
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 0;
  border-radius: 5px;
  color: #475467;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.api-debug-group-toggle:hover {
  color: var(--brand);
  background: #f0f3f8;
}

.api-debug-group-toggle .disclosure-chevron {
  width: 15px;
  height: 15px;
  color: #667085;
}

.api-debug-group-items {
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.api-debug-endpoint {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-radius: 5px;
  color: #475467;
  background: transparent;
  font-size: 13px;
  text-align: left;
}

.api-debug-endpoint:hover {
  color: var(--brand);
  background: #f0f3f8;
}

.api-debug-endpoint.active {
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 700;
}

.api-debug-main {
  min-width: 0;
  overflow-y: auto;
  padding: 0 16px 24px;
  background: #fff;
  scrollbar-width: thin;
}

.api-debug-detail-head {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 -16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.api-debug-detail-head h2 {
  margin-bottom: 3px;
}

.api-debug-path {
  color: var(--muted);
}

.api-debug-send {
  flex: none;
}

.api-debug-section {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
}

.api-debug-section h3 {
  margin-bottom: 13px;
  font-size: 14px;
}

.api-debug-auth-options {
  display: flex;
  align-items: center;
  gap: 24px;
}

.api-debug-auth-options label {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 6px;
  white-space: nowrap;
}

.api-debug-auth-options input[type="radio"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
}

.api-debug-uid {
  width: min(280px, 100%);
  min-height: 36px;
}

.api-debug-uid[hidden] {
  display: block;
  visibility: hidden;
  pointer-events: none;
}

.api-debug-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.api-debug-fields.body {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.api-debug-boolean {
  align-self: end;
  min-width: 0;
  min-height: 38px;
}

.api-debug-fields .api-debug-boolean span {
  white-space: normal;
}

.api-debug-fields.body .api-debug-body-editor {
  grid-column: 1 / -1;
}

.api-debug-fields .schema-textarea {
  min-height: 150px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.api-debug-response {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.api-debug-response[hidden] {
  display: none;
}

.api-debug-response-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.api-debug-response-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.api-debug-response-status .status-ok,
.api-debug-response-status .status-error {
  background: transparent;
  font-weight: 700;
}

.api-debug-content-type {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-debug-table {
  display: grid;
  gap: 12px;
}

.api-debug-table[hidden] {
  display: none;
}

.api-debug-table-title {
  margin: 4px 0 0;
  font-size: 13px;
}

.side-panel,
.tool-list,
.row-auth-pane:first-child {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
}

.panel-main,
.tool-debug-main,
.row-auth-pane:last-child {
  min-width: 0;
  padding: 16px;
}

.asset-layout {
  height: clamp(480px, calc(100vh - 340px), 720px);
  min-height: 480px;
}

.asset-layout .side-panel,
.asset-layout .panel-main {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.asset-layout .side-panel {
  padding: 0;
}

.asset-layout .side-title {
  flex: none;
  margin: 0;
  padding: 16px 16px 10px;
}

.asset-catalog-scroll {
  flex: 1;
  padding: 0 14px 16px;
}

.asset-layout .panel-main {
  padding: 0;
}

.asset-layout .table-shell {
  border: 0;
  border-radius: 0;
  clip-path: none;
}

.asset-list-table {
  table-layout: fixed;
}

.task-list-table,
.stats-analysis-table,
.stats-detail-table {
  table-layout: fixed;
}

.asset-list .fixed-list-head {
  border-bottom: 1px solid var(--line);
}

.asset-list .fixed-list-head th,
.asset-list .fixed-list-body td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-list .fixed-list-head th {
  border-bottom: 0;
}

.asset-list .fixed-list-body tr:last-child td {
  border-bottom: 0;
}

.task-table-card .fixed-list-head,
.stats-analysis-list .fixed-list-head,
.stats-detail-list .fixed-list-head {
  border-bottom: 1px solid var(--line);
}

.task-table-card .fixed-list-head th,
.stats-analysis-list .fixed-list-head th,
.stats-detail-list .fixed-list-head th {
  border-bottom: 0;
}

.task-table-card .fixed-list-head th,
.task-table-card .fixed-list-body td,
.stats-analysis-list .fixed-list-head th,
.stats-analysis-list .fixed-list-body td,
.stats-detail-list .fixed-list-head th,
.stats-detail-list .fixed-list-body td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-table-card .fixed-list-body tr:last-child td,
.stats-analysis-list .fixed-list-body tr:last-child td,
.stats-detail-list .fixed-list-body tr:last-child td {
  border-bottom: 0;
}

.asset-detail-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.drawer.asset-detail-drawer {
  width: min(520px, 100vw);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.asset-detail-drawer > .drawer-head {
  flex: none;
  padding: 18px 20px;
}

.asset-detail-drawer > .drawer-body {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  padding: 0 20px;
}

.asset-detail-tabs {
  flex: none;
  padding-top: 12px;
  background: #fff;
}

.asset-detail-panel {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 0 20px;
  overflow: hidden;
  overscroll-behavior: contain;
}

.dataset-overview-panel {
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-gutter: stable;
}

.dataset-overview-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dataset-overview-content > .asset-detail-list-card,
.dataset-overview-content .asset-detail-list-scroll {
  flex: none;
}

.dataset-overview-content .asset-detail-list-scroll {
  overflow: visible;
  overscroll-behavior: auto;
}

.dataset-summary-reading {
  padding: 16px;
}

.dataset-summary-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
}

.dataset-summary-text.is-collapsed {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  overflow: hidden;
}

.dataset-summary-toggle {
  margin-top: 8px;
}

.asset-detail-edit-card {
  overflow: visible;
}

.asset-detail-list-card {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  overflow: hidden;
}

.asset-detail-list-head,
.asset-detail-list-foot {
  flex: none;
}

.asset-detail-list-scroll {
  min-width: 0;
  min-height: 0;
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
}

.asset-overview-list.is-editing-property,
.asset-overview-list.is-editing-property .asset-detail-list-scroll {
  overflow: visible;
}

.asset-detail-list-scroll .asset-column-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f9fafb;
}

.asset-detail-footer,
.asset-summary-title,
.dimension-values-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.asset-detail-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.asset-summary-title,
.dimension-values-toolbar {
  justify-content: space-between;
}

.asset-summary-status {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.asset-synonym-editor {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.asset-synonym-term-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content 38px;
  align-items: center;
  gap: 12px;
}

.asset-synonym-empty {
  padding: 14px 0;
  text-align: center;
}

.semantic-source-placeholder {
  display: inline-block;
  width: 1px;
  height: 24px;
}

.dataset-summary-editor {
  width: calc(100% - 32px);
  min-height: 168px;
  margin: 16px;
  resize: vertical;
}

.dimension-values-toolbar {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.dimension-values-toolbar .asset-column-search {
  max-width: 360px;
}

.dimension-value-inline-count {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 400;
}

.dimension-value-count-number {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.dimension-values-table th:nth-child(1) {
  width: auto;
}

.dimension-values-panel .cursor-pager {
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.dimension-values-panel .cursor-pager-leading {
  width: 100%;
}

.asset-detail-card-title {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.asset-detail-grid {
  display: grid;
  grid-template-columns: minmax(120px, 0.65fr) minmax(0, 1.35fr);
  gap: 0;
}

.asset-detail-label,
.asset-detail-value {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
}

.asset-detail-label {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.asset-detail-value {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 600;
}

.asset-editable-property-label {
  min-height: 47px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
}

.inline-icon-action {
  width: 24px;
  height: 24px;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
}

.inline-icon-action:hover {
  color: var(--brand);
}

.inline-icon-action.save {
  color: var(--brand);
}

.inline-icon-action .icon {
  width: 16px;
  height: 16px;
}

.modeling-type-editor,
.modeling-type-actions,
.constraint-edit-actions,
.constraint-edit-action {
  display: flex;
  align-items: center;
}

.modeling-type-editor {
  gap: 6px;
  padding-top: 5px;
  padding-bottom: 5px;
}

.modeling-type-control {
  min-width: 0;
  flex: 1;
}

.modeling-type-actions {
  flex: none;
  gap: 2px;
}

.asset-detail-copy {
  padding: 16px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.asset-column-table-wrap {
  overflow-x: auto;
}

.asset-column-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.asset-column-search {
  position: relative;
  display: block;
  min-width: 0;
  flex: 1;
}

.asset-column-search .icon {
  position: absolute;
  top: 50%;
  left: 10px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.asset-column-search-input {
  width: 100%;
  padding-left: 34px;
}

.asset-column-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.asset-column-header > span {
  flex: none;
  white-space: nowrap;
}

.asset-column-header .asset-column-search {
  max-width: 300px;
  margin-left: auto;
}

.asset-probe-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.asset-probe-actions > .btn {
  flex: none;
  white-space: nowrap;
}

.asset-probe-actions .asset-column-search {
  margin-left: 0;
}

.dimension-values-panel[aria-busy="true"] .asset-detail-list-scroll {
  opacity: 0.55;
}

.asset-column-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.asset-column-count {
  white-space: nowrap;
  font-size: 12px;
}

.asset-detail-drawer .asset-column-toolbar {
  align-items: stretch;
  flex-direction: column;
}

.asset-detail-drawer .asset-column-summary {
  justify-content: space-between;
}

.asset-column-toggle {
  padding: 4px 0;
  white-space: nowrap;
}

.asset-column-footer {
  display: flex;
  justify-content: flex-end;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
}

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

.asset-column-table th,
.asset-column-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.asset-column-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.asset-column-table th:nth-child(1) { width: 34%; }
.asset-column-table th:nth-child(2) { width: 22%; }
.asset-column-table th:nth-child(3) { width: 44%; }

.asset-column-table.asset-relation-table th:nth-child(1) { width: 25%; }
.asset-column-table.asset-relation-table th:nth-child(2) { width: 29%; }
.asset-column-table.asset-relation-table th:nth-child(3) { width: 21%; }
.asset-column-table.asset-relation-table th:nth-child(4) { width: auto; }

.asset-column-table.asset-relation-table td {
  white-space: normal;
  min-width: 0;
  overflow-wrap: break-word;
}

.asset-column-table.asset-relation-table td:nth-child(3) {
  white-space: nowrap;
}

.asset-column-table tbody tr:last-child td {
  border-bottom: 0;
}

.dataset-detail-table {
  width: 100%;
  min-width: 872px;
  table-layout: fixed;
}

.dataset-detail-table th,
.dataset-detail-table td {
  min-width: 0;
  padding: 10px 8px;
  vertical-align: middle;
}

.dataset-detail-table thead th {
  height: 44px;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: normal;
}

.dataset-detail-table code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.drawer.asset-detail-drawer.dataset-detail-drawer {
  width: min(960px, 100vw);
}
.dataset-columns-table {
  min-width: 872px;
  table-layout: fixed;
}
.dataset-columns-table th:nth-child(1) { width: 160px; }
.dataset-columns-table th:nth-child(2) { width: 90px; }
.dataset-columns-table th:nth-child(3) { width: 180px; }
.dataset-columns-table th:nth-child(4) { width: auto; }
.dataset-columns-table th:nth-child(5) { width: 160px; }
.dataset-columns-table th:nth-child(6) { width: 64px; }
.dataset-columns-table td:nth-child(2) {
  white-space: normal;
}
.dataset-columns-table td:nth-child(5),
.dataset-columns-table td:nth-child(6) {
  white-space: nowrap;
}
.dataset-column-name {
  display: grid;
  min-width: 0;
  gap: 4px;
}
.dataset-columns-table .dataset-column-name code,
.dataset-column-display-name {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dataset-column-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.dataset-column-actions {
  display: flex;
  gap: 4px;
  width: max-content;
}
.column-field-values {
  min-width: 0;
  max-width: 460px;
}
.column-field-values .asset-sample-list {
  flex-wrap: nowrap;
  overflow: hidden;
  gap: 4px;
}
.column-field-values .sample-value-token {
  max-width: 100px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.column-values-more {
  padding: 0;
  min-height: 24px;
  font-size: 12px;
  white-space: nowrap;
  flex: none;
  margin-left: auto;
}
.column-field-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-top: 4px;
  font-size: 12px;
  white-space: nowrap;
}
.column-field-badge,
.constraint-source-pill {
  flex: none;
  gap: 3px;
  padding: 1px 6px;
  font-size: 11px;
  line-height: 18px;
  white-space: nowrap;
}
.column-field-badge .icon,
.constraint-source-pill .icon {
  width: 12px;
  height: 12px;
}
.column-field-range {
  display: grid;
  gap: 5px;
}
.column-field-boundary {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  gap: 8px;
  align-items: baseline;
}
.column-field-boundary > code {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.column-field-boundary .muted {
  font-size: 12px;
  white-space: nowrap;
}
.column-probe-warning {
  color: #b54708;
  margin-left: 5px;
  cursor: help;
}
.column-values-root > .modal-backdrop {
  z-index: 100;
}
.modal.column-values-modal {
  z-index: 110;
  inset: 0;
  margin: auto;
  width: min(620px, calc(100vw - 24px));
  height: min(560px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  transform: none;
}
.column-values-body {
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
}
.column-values-table .column-values-item {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.column-values-table th:first-child {
  width: auto;
}
.column-values-scope {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px;
  overflow-wrap: anywhere;
}
.column-values-modal .column-field-boundary > code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.inline-icon-action.is-loading .icon {
  animation: probe-spin 800ms linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .inline-icon-action.is-loading .icon {
    animation: none;
  }
}

.column-probe-secondary-root > .modal-backdrop {
  z-index: 100;
  opacity: 1;
}

.modal.column-probe-editor-modal {
  inset: 0;
  margin: auto;
  z-index: 110;
  width: min(760px, calc(100vw - 24px));
  height: min(640px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  opacity: 1;
  transform: none;
}

.modal-backdrop.column-probe-confirm-backdrop {
  z-index: 120;
}

.modal.column-probe-confirm-modal {
  z-index: 130;
}

.column-probe-editor-body {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: auto;
}

.column-probe-readonly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f9fafb;
}

.column-probe-readonly-grid > div {
  display: grid;
  gap: 8px;
}

.column-probe-readonly-grid > div {
  align-content: start;
}

.column-probe-readonly-grid dt {
  color: var(--muted);
  font-size: 12px;
}

.column-probe-readonly-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.column-enum-editor {
  height: 128px;
  min-height: 128px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 22px;
  resize: vertical;
}

.column-probe-boundary-options {
  min-height: 36px;
  gap: 10px;
}
.column-boundary-switch-slot {
  display: inline-flex;
  align-items: center;
  width: 36px;
  flex: 0 0 36px;
}

.column-probe-boundary-value {
  min-height: 36px;
  display: grid;
  align-items: center;
}

.column-probe-boundary-value > .field {
  height: 36px;
  min-height: 36px;
  padding: 7px 10px;
}

.column-probe-config-card {
  container-type: inline-size;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.column-probe-rule-grid {
  display: grid;
  gap: 8px;
}

.column-probe-form-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 36px;
}

.column-probe-row-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #344054;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
}

.column-probe-row-content {
  min-width: 0;
}

.column-probe-type-row .field {
  width: min(280px, 100%);
  height: 36px;
  min-height: 36px;
}

.column-probe-radio-group {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 16px;
}

.column-probe-boundary-controls {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.column-probe-restore {
  justify-self: start;
}

.column-probe-enum-editor {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: start;
  gap: 10px 8px;
}

.disabled-action-tooltip {
  display: inline-flex;
}

.inline-notice {
  padding: 9px 10px;
  border: 1px solid #b2ccff;
  border-radius: 6px;
  color: #1849a9;
  background: #eff4ff;
  font-size: 12px;
  line-height: 1.5;
}

.column-enum-editor {
  scrollbar-color: #c5cad3 transparent;
  scrollbar-width: thin;
}

.column-enum-editor::-webkit-scrollbar {
  width: 8px;
}

.column-enum-editor::-webkit-scrollbar-track,
.column-enum-editor::-webkit-scrollbar-corner {
  border-radius: 999px;
  background: transparent;
}

.column-enum-editor::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #c5cad3;
  background-clip: content-box;
}

/* Field configuration and value previews reuse the common row and list controls. */
.column-field-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.column-field-preview > .asset-sample-list,
.column-field-preview > .column-field-range {
  min-width: 0;
  flex: 1;
}
.column-updated-heading {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.column-values-filter {
  display: grid;
  gap: 8px;
  padding: 5px 5px 12px;
}
.column-values-filter .filter-bar,
.column-values-filter .filter-bar-fields,
.column-values-filter .search-input {
  width: 100%;
}
.column-values-fixed-list > .fixed-list-body {
  overflow-y: auto;
  min-height: 0;
}
.column-values-fixed-list > .fixed-list-foot {
  padding-top: 12px;
}
.column-values-range-content {
  display: grid;
  gap: 20px;
  overflow-y: auto;
}
.column-probe-boundary-row {
  align-items: start;
}
.column-probe-boundary-row > .column-probe-row-label {
  padding-top: 8px;
}
.column-probe-boundary-controls > .inline-error {
  grid-column: 1 / -1;
}
.column-probe-number {
  width: 96px;
  height: 36px;
}
.column-probe-enum-editor > .column-probe-row-content {
  display: grid;
  gap: 8px;
}
.column-probe-enum-editor .column-enum-editor {
  width: 100%;
}
.column-probe-restore-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
@media (max-width: 520px) {
  .column-probe-config-card {
    padding: 12px;
  }
}
@media (max-width: 640px) {
  .column-values-fixed-list .cursor-pager {
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .column-values-fixed-list .cursor-pager-leading {
    grid-column: 1 / -1;
  }
  .column-values-fixed-list .list-footer-spacer {
    display: none;
  }
  .column-values-fixed-list .cursor-pager .btn {
    width: 100%;
    min-width: 0;
    padding: 6px 8px;
  }
  .column-values-fixed-list .cursor-pager > .btn:last-child {
    grid-row: 2;
    grid-column: 3;
  }
  .column-values-fixed-list .cursor-pager-position {
    grid-row: 3;
    grid-column: 1 / 3;
    justify-self: end;
  }
  .column-values-fixed-list .cursor-pager-total {
    grid-row: 3;
    grid-column: 3;
    align-self: center;
  }
}

.dataset-columns-panel .asset-detail-card-title {
  border-bottom: 0;
}

.dataset-constraints-panel {
  flex: 0 1 auto;
  min-height: 0;
  overflow: auto;
}

.dataset-constraints-fields {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.dataset-constraint-section {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 24px;
  gap: 16px;
  padding: 16px;
}

.dataset-constraint-heading {
  display: flex;
  min-width: 0;
  align-self: start;
  min-height: 28px;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.dataset-constraint-section.is-editing {
  grid-template-columns: 88px minmax(0, 1fr);
}

.dataset-constraint-edit {
  align-self: start;
}

.dataset-unique-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 480px) 24px;
  align-items: start;
  gap: 8px;
  min-width: 0;
}

.dataset-unique-row > .unique-key-tag {
  line-height: 28px;
}

.dataset-unique-row > .inline-icon-action {
  margin-top: 6px;
}

.dataset-constraint-content {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.dataset-primary-editor {
  display: grid;
  grid-template-columns: minmax(0, 480px) 24px;
  align-items: start;
  gap: 8px;
  min-width: 0;
}

.dataset-primary-editor > .inline-icon-action {
  margin-top: 6px;
}

.dataset-constraint-add {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
}

.dataset-partition-add {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dataset-partition-add .gw-select {
  flex: 0 1 360px;
  min-width: 0;
}

.dataset-partition-actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

[data-testid="constraint-partitionColumns"] .dataset-constraint-group + .dataset-constraint-group {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.dataset-constraint-section + .dataset-constraint-section {
  border-top: 1px solid var(--line);
}

.dataset-constraint-line,
.dataset-constraint-values,
.dataset-constraint-footer,
.dataset-partition-type,
.dataset-partition-type > label,
.dataset-partition-offset {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dataset-constraint-values,
.dataset-constraint-line {
  flex-wrap: wrap;
}

.dataset-empty-constraint {
  justify-self: start;
  padding: 0;
  color: var(--muted);
}

.dataset-constraint-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.dataset-constraint-footer {
  justify-content: space-between;
}

.dataset-constraint-footer-leading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-width: 0;
}

.dataset-constraint-group + .dataset-partition-add {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.dataset-constraint-content > .dataset-constraint-footer,
.dataset-constraint-content > .constraint-edit-actions {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.dataset-constraint-content > .constraint-edit-actions {
  justify-content: flex-end;
}

.dataset-partition-rule {
  padding-left: 30px;
}

.dataset-partition-type {
  flex-wrap: wrap;
  gap: 12px;
}

.dataset-partition-date-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.dataset-partition-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.dataset-partition-field > .caption {
  white-space: nowrap;
}

.dataset-partition-field > .gw-select {
  width: 140px;
}

.dataset-partition-field:nth-child(2) > .gw-select {
  width: 92px;
}

.dataset-partition-offset > input {
  width: 80px;
  min-width: 0;
  min-height: 28px;
  height: 28px;
  padding: 3px 8px;
}

.dataset-partition-summary {
  padding-left: 30px;
  overflow-wrap: anywhere;
}

.dataset-partition-type .choice-control {
  min-height: 16px;
  width: 16px;
  height: 16px;
  padding: 0;
  flex: none;
}

@media (max-width: 520px) {
  .dataset-constraint-section {
    grid-template-columns: 72px minmax(0, 1fr) 24px;
    gap: 8px;
    padding: 12px;
  }
  .dataset-constraint-section.is-editing {
    grid-template-columns: 72px minmax(0, 1fr);
  }
  .dataset-unique-row {
    grid-template-columns: 28px minmax(0, 1fr) 24px;
    gap: 4px;
  }
  .dataset-constraint-footer {
    flex-wrap: wrap;
  }
  .dataset-constraint-footer > .constraint-edit-actions {
    margin-left: auto;
  }
  .dataset-partition-rule,
  .dataset-partition-summary {
    padding-left: 0;
  }
}

.ui-selection-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--brand-soft);
  color: var(--ink);
  overflow-wrap: anywhere;
}

.ui-selection-chip > .inline-icon-action {
  width: 20px;
  height: 20px;
  flex: none;
}

.ui-selection-chip.is-invalid {
  color: var(--danger);
}

.ui-selection-chip > span,
.ui-selection-chip > code {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.constraint-edit-actions {
  flex: none;
  gap: 12px;
}

.constraint-edit-action {
  gap: 4px;
  padding: 2px 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
}

.constraint-edit-action.save {
  color: var(--brand);
}

.constraint-edit-action:hover {
  color: var(--ink);
}

.constraint-edit-action.save:hover {
  color: var(--brand-hover);
}

.constraint-edit-action .icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.4;
}

.constraint-invalid-notice {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 8px 12px;
  border-top: 1px solid #fedf89;
  color: var(--warning);
  background: var(--warning-soft);
  font-size: 12px;
}

.constraint-invalid-notice .icon {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 1px;
}

.unique-key-tag {
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  white-space: nowrap;
}

.partition-order {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #7698f3;
  border-radius: 50%;
  color: var(--brand);
  font-size: 11px;
}

.constraint-partition-editor {
  display: flex;
  align-items: center;
  gap: 8px;
}

.constraint-partition-editor > .dataset-partition-type,
.constraint-partition-editor > .caption {
  margin-left: 8px;
}

.dataset-partition-type {
  gap: 16px;
}

.constraint-partition-editor .inline-icon-action {
  width: 22px;
  height: 22px;
}

.constraint-partition-editor .partition-move-up .icon,
.constraint-partition-editor .partition-move-down .icon {
  width: 14px;
  height: 14px;
}

.constraint-partition-editor .partition-move-up .icon {
  transform: rotate(-90deg);
}

.constraint-partition-editor .partition-move-down .icon {
  transform: rotate(90deg);
}

.constraint-partition-editor .partition-remove:hover {
  color: var(--danger);
}

.asset-column-empty {
  text-align: center !important;
}

.asset-sample-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 16px;
}

.asset-column-table .asset-sample-list {
  padding: 0;
}

.sample-value-token {
  max-width: 100%;
  padding: 4px 8px;
  overflow-wrap: anywhere;
  border-radius: 5px;
  color: #344054;
  background: #f2f4f7;
  font-size: 12px;
}

@media (max-width: 520px) {
  .asset-column-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .asset-column-summary {
    justify-content: space-between;
  }

  .asset-detail-drawer > .drawer-head {
    padding: 16px;
  }

  .asset-detail-drawer > .drawer-body {
    padding: 0 16px;
  }

  .asset-detail-panel {
    padding-bottom: 20px;
  }

  .asset-synonym-term-row {
    grid-template-columns: minmax(0, 1fr) max-content;
  }

  .asset-synonym-term-row .icon-only {
    grid-column: 2;
  }

  .dimension-values-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .dimension-values-toolbar .asset-column-search {
    max-width: none;
  }

  .asset-column-header {
    align-items: stretch;
    flex-direction: column;
  }

  .asset-probe-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .asset-column-header .asset-column-search {
    max-width: none;
    margin-left: 0;
  }

}

.asset-detail-skeleton {
  min-height: 240px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.asset-detail-skeleton .skeleton-line {
  height: 18px;
  border-radius: 5px;
  background: linear-gradient(90deg, #f2f4f7 25%, #e9edf5 50%, #f2f4f7 75%);
  background-size: 200% 100%;
  animation: asset-skeleton 1.2s infinite;
}

.asset-detail-drawer > .drawer-body > .asset-detail-skeleton {
  margin-top: 18px;
}

.asset-detail-skeleton .skeleton-line:not(.wide) {
  width: 72%;
}

.semantic-skeleton {
  padding: 12px;
}

.synonym-list.refreshing {
  opacity: 0.72;
}

@keyframes asset-skeleton {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.synonym-token {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.synonym-token.manual {
  color: #2457c5;
  background: #eef4ff;
}

.synonym-token.llm {
  color: #087443;
  background: #ecfdf3;
}

.synonym-token.inactive {
  opacity: 0.55;
}

.asset-detail-error {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 16px;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 7px;
}

.tool-list {
  display: grid;
  align-content: start;
  gap: 6px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.tool-list-title,
.side-title {
  margin: 2px 0 10px;
  color: var(--ink);
  font-weight: 700;
}

.tree-group {
  margin-top: 8px;
}

.tree-parent,
.tree-child {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 0;
  border-radius: 5px;
  color: #475467;
  background: transparent;
  text-align: left;
}

.tree-parent {
  margin-top: 5px;
  color: var(--text);
  font-weight: 600;
}

.tree-child {
  padding-left: 28px;
}

.tree-parent:hover,
.tree-child:hover {
  background: #f0f3f8;
}

.tree-parent.active,
.tree-child.active {
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 600;
}

.tree-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.asset-category-branch {
  min-width: 0;
}

.asset-category-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
}

.asset-category-toggle {
  width: 22px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: #667085;
  background: transparent;
  cursor: pointer;
}

.asset-category-toggle .disclosure-chevron {
  width: 15px;
  height: 15px;
}

.asset-category-toggle-placeholder {
  width: 22px;
  height: 34px;
}

.asset-category-select {
  min-width: 0;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px 0 2px;
  overflow: hidden;
  border: 0;
  border-radius: 5px;
  color: #475467;
  background: transparent;
  text-align: left;
}

.asset-category-select > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-category-row:hover,
.asset-category-row.active {
  border-radius: 5px;
  background: #f0f3f8;
}

.asset-category-row.active {
  background: var(--brand-soft);
}

.asset-category-select.active {
  color: var(--brand);
  font-weight: 600;
}

.asset-category-children[hidden] {
  display: none;
}

.tree-loading {
  padding: 8px 9px;
}

.category-path {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.category-path .separator {
  color: var(--muted);
}

.tool-item,
.dataset-item,
.theme-item {
  width: 100%;
  min-height: 44px;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 0;
  border-radius: 5px;
  color: #475467;
  background: transparent;
  text-align: left;
}

.tool-item small {
  color: var(--muted);
}

.theme-item-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-item code {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.tool-item:hover,
.dataset-item:hover,
.theme-item:hover {
  background: #f0f3f8;
}

.tool-item.active,
.dataset-item.active,
.theme-item.active {
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 600;
}

.theme-list {
  display: grid;
  align-content: start;
  gap: 4px;
  margin-top: 10px;
  overflow-y: auto;
}

.resource-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.resource-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 7px;
  color: #2949a8;
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 700;
}

.resource-icon.purple {
  color: var(--purple);
  background: var(--purple-soft);
}

.resource-icon.green {
  color: var(--success);
  background: var(--success-soft);
}

.asset-row td {
  height: 54px;
}

.tool-detail-tabs {
  display: flex;
  gap: 22px;
  margin: 0 -16px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.tool-debug-main {
  overflow-y: auto;
  padding: 0 16px 24px;
  background: #fff;
  scrollbar-width: thin;
}

.overview-page .tool-debug-main,
.overview-page .tool-list {
  overflow: visible;
}

.tool-debug-form {
  display: grid;
  min-width: 0;
  padding: 16px 18px 18px;
}

.tool-debug-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.tool-call-card,
.tool-result-card {
  min-width: 0;
  overflow: hidden;
}

.tool-request-block {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.tool-request-label {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.tool-workspace-head {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.tool-workspace-head h3 {
  margin: 0;
  font-size: 15px;
}

.tool-call-body,
.tool-result-body {
  padding: 16px;
}

.textarea-shell {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
}

.textarea-shell:focus-within {
  outline: 3px solid rgba(49, 91, 215, 0.24);
}

.textarea-shell textarea {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  resize: vertical;
  scrollbar-color: #c5cad3 #fff;
  scrollbar-width: thin;
}

.textarea-shell textarea:focus,
.textarea-shell textarea:focus-visible {
  outline: none;
}

.textarea-shell textarea::-webkit-scrollbar {
  width: 8px;
}

.textarea-shell textarea::-webkit-scrollbar-track {
  background: #fff;
}

.textarea-shell textarea::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #c5cad3;
}

.tool-arguments-input {
  min-height: 180px;
  font-size: 13px;
  line-height: 1.55;
}

.tool-argument-example-hint {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.tool-request-block .btn {
  justify-self: start;
  margin-top: 2px;
}

.tool-schema-table td.tool-schema-constraint {
  min-width: 132px;
  color: var(--text);
  white-space: normal;
  line-height: 1.55;
}

.tool-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
}

.tool-result-title {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.tool-result-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-result-body {
  margin: 0 18px 18px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #18233d;
  border-radius: 6px;
  background: #0b1020;
}

.tool-result-body .result-body {
  min-height: 240px;
  max-height: 520px;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  scrollbar-color: #64748b #0b1020;
  scrollbar-width: thin;
}

.tool-result-body .result-body::-webkit-scrollbar {
  width: 8px;
}

.tool-result-body .result-body::-webkit-scrollbar-track {
  background: #0b1020;
}

.tool-result-body .result-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #64748b;
}

.tool-argument-fields > .schema-fieldset {
  grid-column: 1 / -1;
}

.tool-view[hidden] {
  display: none;
}

.tool-view {
  padding-top: 16px;
}

.tool-meta-list {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px 16px;
  font-size: 13px;
}

.overview-page-header {
  align-items: center;
}

.overview-mcp-address {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.overview-mcp-label {
  flex: none;
  color: var(--muted);
  font-size: 13px;
}

.overview-mcp-address code {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-detail-stack {
  display: grid;
  gap: 16px;
  padding: 16px 0 8px;
}

.tool-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tool-detail-name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.tool-openapi-badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  white-space: nowrap;
}

.tool-openapi-method,
.tool-openapi-path {
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}

.tool-docs-plate,
.tool-call-plate,
.tool-result-plate {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tool-docs-block {
  padding: 16px 18px 18px;
}

.tool-docs-block + .tool-docs-block {
  border-top: 1px solid var(--line);
}

.tool-docs-block h3,
.tool-call-plate > h3,
.tool-result-title h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.tool-docs-block h3 {
  margin-bottom: 12px;
}

.tool-call-plate > h3 {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.tool-schema-table-shell {
  border-radius: 8px;
}

.tool-schema-table {
  font-size: 13px;
}

.tool-schema-table td.tool-schema-doc {
  min-width: 220px;
  color: var(--text);
  white-space: normal;
  line-height: 1.55;
}

.tool-required {
  display: inline-flex;
  align-items: center;
  min-width: 28px;
  justify-content: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.tool-required.is-yes {
  color: #c4320a;
  background: #fff4ed;
}

.tool-required.is-no {
  color: #667085;
  background: #f2f4f7;
}

.tool-meta-list .label {
  color: var(--muted);
}

.overview-address {
  display: grid;
  grid-template-columns: 140px max-content auto 1fr;
  align-items: center;
  gap: 14px;
}

.tool-detail-tab {
  position: relative;
  min-height: 42px;
  padding: 0 2px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
}

.tool-detail-tab:hover,
.tool-detail-tab.active {
  color: var(--brand);
}

.tool-detail-tab.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  content: "";
  background: var(--brand);
  border-radius: 3px 3px 0 0;
}

.overview-debug-content > .page {
  width: 100%;
  gap: 0;
}

.overview-debug-content .page-header {
  display: none;
}

.overview-debug-content .tool-layout {
  border: 0;
  box-shadow: none;
}

.pane-heading,
.row-auth-rule-header,
.panel-toolbar,
.api-key-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-toolbar > .inline-actions {
  flex-wrap: nowrap;
}

.theme-detail-heading {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.theme-detail-title {
  min-width: 0;
  margin-bottom: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-detail-id {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--muted);
  background: #f2f4f7;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.theme-project-id {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
  user-select: text;
}

.panel-toolbar .search-input {
  width: 260px;
}

.row-auth-pane {
  min-width: 0;
  padding: 16px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.row-auth-search {
  position: relative;
  display: block;
  margin: 14px 0;
}

.row-auth-dataset-list {
  display: grid;
  align-content: start;
  flex: 1;
  min-height: 0;
  gap: 6px;
  overflow-y: auto;
}

.row-auth-dataset-tree {
  display: grid;
  align-content: start;
  gap: 4px;
}

.row-auth-category-branch,
.row-auth-category-children {
  display: grid;
  gap: 4px;
}

.row-auth-category-children {
  margin-left: 18px;
}

.row-auth-category-children[hidden] {
  display: none;
}

.row-auth-category-row {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 0;
  border-radius: 5px;
  color: var(--text);
  background: transparent;
  font-weight: 600;
  text-align: left;
}

.row-auth-category-row:hover {
  background: #f0f3f8;
}

.row-auth-category-row > span:not(.row-auth-category-count) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-auth-category-row .disclosure-chevron {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: #667085;
}

.row-auth-category-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.row-auth-category-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  color: var(--danger);
  font-size: 12px;
}

.row-auth-dataset-row {
  width: 100%;
  min-height: 36px;
  display: block;
  padding: 7px 10px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.row-auth-dataset-name {
  display: block;
  overflow: hidden;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-auth-dataset-row:hover {
  background: #f0f3f8;
}

.row-auth-dataset-row.active {
  color: var(--brand);
  background: var(--brand-soft);
}

.row-auth-table-scroll {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  clip-path: inset(0 round 7px);
}

.row-auth-rule-toolbar {
  flex: none;
  margin-bottom: 14px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fafbfc;
}

.row-auth-rule-toolbar .field {
  width: min(320px, calc(100% - 52px));
}

.row-auth-rule-results {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.row-auth-rule-table {
  min-width: 930px;
  table-layout: fixed;
}

.row-auth-rule-table th:nth-child(1) {
  width: 190px;
}

.row-auth-rule-table th:nth-child(2) {
  width: 250px;
}

.row-auth-rule-table th:nth-child(3) {
  width: 340px;
}

.row-auth-rule-table th:nth-child(4) {
  width: 150px;
}

.row-auth-rule-table td {
  min-width: 0;
}

.row-auth-cell-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-auth-rule-table .button-row {
  flex-wrap: nowrap;
}

.status-state {
  min-height: 250px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
}

.status-state-compact {
  min-height: 160px;
}

.status-state-mark {
  width: 34px;
  height: 26px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background:
    linear-gradient(#cbd5e1, #cbd5e1) 7px 7px / 18px 2px no-repeat,
    linear-gradient(#e2e8f0, #e2e8f0) 7px 13px / 13px 2px no-repeat,
    #f8fafc;
}

.status-state-copy {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.status-state-title {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.status-state-copy .caption {
  max-width: 560px;
  margin: 0;
}

.status-state-error .status-state-mark {
  border-color: #fda29b;
  background:
    linear-gradient(#f04438, #f04438) 15px 6px / 2px 8px no-repeat,
    linear-gradient(#f04438, #f04438) 15px 17px / 2px 2px no-repeat,
    #fff5f4;
}

.status-state-error .status-state-title {
  color: var(--danger);
  font-weight: 600;
}

.status-state-loading {
  opacity: 0;
  animation: status-state-reveal 120ms ease 160ms forwards;
}

.status-state-loading .status-state-mark {
  width: 48px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #f2f4f7 25%, #e9edf5 50%, #f2f4f7 75%);
  background-size: 200% 100%;
  animation: status-state-shimmer 1.2s linear 160ms infinite;
}

@keyframes status-state-reveal {
  to {
    opacity: 1;
  }
}

@keyframes status-state-shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

.empty-table-row:hover td {
  background: transparent;
}

.empty-table-row > td {
  padding: 0;
}

.status-state-table {
  min-height: 280px;
}

.status-state-fill {
  min-height: 100%;
  flex: 1;
}

.stats-overview-loading {
  grid-column: 1 / -1;
}

.toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #d0d5dd;
}

.toggle-switch::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  content: "";
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.2);
  transition: transform 180ms ease;
}

.toggle-switch.on {
  background: var(--brand);
}

.toggle-switch.on::after {
  transform: translateX(16px);
}

.api-key-toolbar {
  margin-bottom: 14px;
}

.api-key-toolbar .filters {
  flex-wrap: nowrap;
}

.api-key-toolbar input {
  width: 220px;
}

.stats-filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(150px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  padding: 16px;
}

.stats-filter-actions {
  display: flex;
  gap: 8px;
  padding-bottom: 1px;
}

.stats-ranking-card {
  height: clamp(430px, calc(100vh - 360px), 680px);
  min-height: 430px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.task-filter-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 16px;
}

.task-filter-fields {
  display: flex;
  flex: 0 1 548px;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.task-filter-fields > .form-row {
  flex: 0 0 128px;
  min-width: 0;
}

.task-filter-grid.custom-range .task-filter-fields {
  flex-basis: 828px;
}

.task-filter-query {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-left: auto;
}

.task-filter-query > .form-row {
  width: 220px;
}

.task-filter-actions {
  display: flex;
  gap: 8px;
}

.task-table-card {
  height: clamp(430px, calc(100vh - 405px), 680px);
  min-height: 430px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.row-auth-layout {
  height: clamp(480px, calc(100vh - 340px), 720px);
  min-height: 480px;
}

.row-auth-pane {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.theme-layout {
  height: clamp(520px, calc(100vh - 220px), 760px);
}

.theme-layout .side-panel,
.theme-layout .panel-main {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.theme-layout .theme-list {
  flex: 1;
  min-height: 0;
}

.theme-layout .panel-main {
  gap: 14px;
  overflow: hidden;
}

.theme-resource-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.theme-resource-toolbar .search-input {
  width: min(300px, 42%);
}

.drawer-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(2px);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  width: min(520px, 100vw);
  overflow: auto;
  padding: 20px;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-body {
  padding-top: 18px;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 90;
  display: flex;
  flex-direction: column;
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: hidden;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
}

.modal-shell {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.modal-shell > .modal-head {
  flex: none;
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-shell > .modal-head h2 {
  margin: 0;
}

.modal-shell > .modal-body {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
}

.modal-shell > .modal-actions {
  min-height: 66px;
  flex: none;
  margin: 0;
  padding: 14px 20px;
  background: #fff;
}

.modal > .modal-head,
.modal > .modal-actions {
  flex: none;
}

.modal > .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.modal-size-large {
  width: min(1120px, calc(100vw - 40px));
  height: min(860px, calc(100vh - 40px));
  max-height: calc(100vh - 40px);
}

.row-auth-modal {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.row-auth-modal > .page-header {
  flex: 0 0 auto;
  z-index: 2;
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.row-auth-modal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden !important;
  padding: 0 !important;
}

.row-auth-form {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding: 16px 20px 20px;
}

.row-auth-basic-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.row-auth-table-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 16px;
}

.row-auth-condition-builder {
  display: grid;
  gap: 16px;
}

.row-auth-table-settings {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8faff;
}

.row-auth-permission-table-picker {
  display: grid;
  gap: 6px;
}

.row-auth-async-select {
  position: relative;
}

.row-auth-async-select .field {
  width: 100%;
}

.row-auth-load-more {
  width: calc(100% - 20px);
  margin: 8px 10px;
}

.row-auth-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.row-auth-section legend {
  padding: 0 6px;
  font-weight: 650;
}

.row-auth-member-modes,
.row-auth-group-header,
.row-auth-group-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row-auth-radio,
.row-auth-latest-partition {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.row-auth-radio input,
.row-auth-latest-partition input {
  flex: 0 0 16px;
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
}

.row-auth-latest-partition {
  align-self: end;
  min-height: 36px;
  padding-bottom: 7px;
}

.row-auth-member-body {
  min-width: 0;
}

.row-auth-column-head,
.row-auth-condition-row {
  display: grid;
  grid-template-columns: 72px minmax(130px, 1fr) 22px minmax(130px, 1fr) 28px;
  align-items: center;
  gap: 8px;
}

.row-auth-column-head {
  margin-bottom: -4px;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.row-auth-column-head span:nth-child(3) {
  grid-column: 4;
}

.row-auth-condition-group {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #c7d2fe;
  border-left: 3px solid #818cf8;
  border-radius: 7px;
  background: #f8faff;
}

.row-auth-condition-group.depth-1 {
  border-color: #a7f3d0;
  border-left-color: #34d399;
  background: #fbfffd;
}

.row-auth-condition-group.depth-2 {
  border-color: #fde68a;
  border-left-color: #f59e0b;
  background: #fffdfa;
}

.row-auth-condition-group.depth-3 {
  border-color: #fecdd3;
  border-left-color: #fb7185;
  background: #fffafa;
}

.row-auth-group-header > .gw-select {
  flex: 0 0 74px;
  width: 74px;
}

.row-auth-group-header .danger-text {
  margin-left: auto;
  color: var(--danger);
}

.row-auth-group-children {
  display: grid;
  gap: 10px;
}

.row-auth-condition-label,
.row-auth-arrow {
  color: var(--muted);
  text-align: center;
}

.row-auth-remove-condition {
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 20px;
}

.row-auth-group-actions {
  gap: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.row-auth-form-actions {
  justify-content: flex-end;
}

.row-auth-form-actions .caption {
  margin-right: auto;
}

.row-auth-advanced-warning {
  display: grid;
  gap: 10px;
}

.row-auth-advanced-warning > p {
  color: var(--warning-ink);
}

.required-mark {
  color: var(--danger);
}

@media (max-width: 840px) {
  .row-auth-basic-grid,
  .row-auth-table-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .row-auth-latest-partition {
    align-self: start;
  }

  .row-auth-table-settings {
    padding: 12px;
  }

  .row-auth-column-head {
    display: none;
  }

  .row-auth-condition-row {
    grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr) 28px;
  }

  .row-auth-condition-label {
    display: none;
  }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.modal-body {
  padding: 2px 0 18px;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.modal-action-spacer {
  flex: 1;
}

.close-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
}

.close-btn:hover {
  color: var(--ink);
  background: #f2f4f7;
}

.theme-summary-grid {
  margin-bottom: 14px;
}

.theme-resource-table {
  margin-top: 12px;
}

.theme-editor-modal {
  width: min(1180px, calc(100vw - 40px));
  height: min(860px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.theme-editor-modal .modal-head,
.theme-editor-modal > .modal-actions {
  flex: none;
}

.theme-save-impact {
  display: flex;
  min-width: 260px;
  max-width: min(520px, 55vw);
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  line-height: 1.4;
}

.theme-editor-modal[aria-busy="true"] .theme-editor-body {
  opacity: 0.72;
}

.theme-editor-body {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
  overflow: auto;
  padding: 18px 20px;
}

.theme-basic-fields {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(360px, 1fr);
  align-items: start;
  gap: 18px;
}

.theme-description {
  min-height: 36px;
}

.theme-selection-section,
.theme-content-category-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.theme-selection-head {
  display: flex;
  align-items: center;
  gap: 20px;
}

.theme-selection-head > strong {
  min-width: 56px;
}

.theme-selection-values {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.selection-value-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.selection-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selection-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 10px;
  color: #3159bc;
  background: var(--brand-soft);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.selection-chip .resource-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.theme-asset-picker {
  z-index: 110;
  width: min(1040px, calc(100vw - 52px));
  height: min(720px, calc(100vh - 52px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.nested-modal-backdrop {
  z-index: 100;
  background: rgba(15, 23, 42, 0.3);
}

.theme-picker-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden !important;
}

.theme-picker-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(480px, 1.5fr);
  min-height: 0;
  flex: 1;
  gap: 16px;
  overflow: hidden;
}

.theme-picker-grid > section {
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.theme-picker-category-pane,
.theme-picker-asset-pane {
  display: flex;
  flex-direction: column;
}

.theme-picker-asset-pane > .search-input {
  width: auto;
  flex: none;
  margin: 10px 14px;
}

.theme-picker-section-head {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.theme-picker-section-head h3 {
  margin: 0;
}

.theme-picker-section-head .inline-actions {
  gap: 2px;
}

.theme-picker-section-head .btn.link {
  padding: 4px 7px;
}

.theme-picker-categories,
.theme-picker-assets {
  display: grid;
  align-content: start;
}

.theme-picker-categories {
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
}

.theme-picker-assets {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 0 6px;
}

.theme-picker-empty-state {
  min-height: 100%;
}

.theme-picker-asset-pane > .cursor-pager {
  flex: none;
  margin: 0;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.theme-picker-choice {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 7px 8px;
  border-bottom: 1px solid #eef1f5;
  cursor: pointer;
}

.theme-picker-choice:hover {
  background: #f5f7fb;
}

.theme-picker-choice.included {
  cursor: default;
}

.theme-picker-choice-copy {
  display: grid;
  min-width: 0;
}

.theme-picker-choice .caption {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-picker-detail-head,
.theme-picker-page-actions {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.theme-picker-page-actions {
  min-height: 42px;
  padding-top: 5px;
  padding-bottom: 5px;
}

.theme-picker-page-actions .inline-actions {
  gap: 2px;
}

.theme-picker-page-actions .btn.link {
  padding: 4px 7px;
}

.theme-picker-active-category {
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-picker-category-action {
  flex: none;
}

.theme-picker-category-action .icon {
  width: 15px;
  height: 15px;
}

.theme-picker-page-summary,
.theme-picker-selection-summary {
  font-size: 13px;
  white-space: nowrap;
}

.theme-picker-category-choice {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 4px 8px;
  border-radius: 7px;
}

.theme-picker-category-choice:hover {
  background: #f5f7fb;
}

.theme-picker-category-choice.active {
  background: var(--brand-soft);
}

.theme-picker-category-choice.selected:not(.active) .theme-picker-category-nav {
  color: var(--brand);
}

.theme-picker-category-all {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 2px;
}

.theme-picker-category-nav {
  min-width: 0;
  padding: 6px 0;
  overflow: hidden;
  border: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.theme-picker-category-nav:focus-visible,
.theme-picker-tree-toggle:focus-visible {
  outline: 3px solid rgba(49, 91, 215, 0.24);
  outline-offset: 1px;
}

.theme-picker-tree-toggle,
.theme-picker-tree-toggle-placeholder {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.theme-picker-tree-toggle {
  padding: 0;
  border: 0;
  color: #667085;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
}

.theme-picker-tree-toggle:hover {
  color: var(--brand);
  background: #e9eefb;
}

.theme-picker-tree-toggle .disclosure-chevron {
  width: 15px;
  height: 15px;
}

.theme-picker-category-status {
  padding: 2px 6px;
  color: var(--brand);
  background: var(--brand-soft);
  border: 0;
  font-size: 11px;
  white-space: nowrap;
}

.theme-picker-category-status.inherited {
  color: #667085;
  background: #f1f3f6;
}

.theme-picker-asset-status {
  display: inline-flex;
  align-items: center;
  color: var(--brand);
  font-size: 12px;
  white-space: nowrap;
}

.theme-picker-asset-status.included {
  color: #667085;
}

.theme-picker-pager {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.theme-editor-section-head,
.theme-category-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.theme-editor-category-panel,
.theme-category-panel {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.theme-editor-content {
  min-height: 0;
  background: #fff;
}

.theme-editor-category-panel,
.theme-category-panel {
  padding: 14px;
}

.theme-editor-content {
  overflow: hidden;
}

.theme-editor-category-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.theme-category-panel {
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}

.theme-category-toolbar {
  min-height: 38px;
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f3f7;
}

.theme-category-toolbar .search-input {
  width: min(280px, 45%);
}

.theme-category-tree {
  display: grid;
  align-content: start;
  min-height: 0;
  gap: 2px;
  overflow: auto;
  padding-top: 8px;
}

.theme-category-branch {
  position: relative;
  min-width: 0;
}

.theme-category-row,
.theme-category-resource {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 8px;
  border-radius: 6px;
  transition: background-color 120ms ease;
}

.theme-category-resource-editable {
  outline: none;
}

.theme-resource-row-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  opacity: 0;
  transition: opacity 120ms ease;
}

.theme-category-resource-editable:hover .theme-resource-row-actions,
.theme-category-resource-editable:focus-within .theme-resource-row-actions {
  opacity: 1;
}

.theme-resource-row-actions .btn {
  min-height: 26px;
  padding: 2px 5px;
  font-size: 11px;
}

.theme-tree-depth-1 { padding-left: 32px; }
.theme-tree-depth-2 { padding-left: 56px; }
.theme-tree-depth-3 { padding-left: 80px; }
.theme-tree-depth-4 { padding-left: 104px; }
.theme-tree-depth-5 { padding-left: 128px; }
.theme-tree-depth-6 { padding-left: 152px; }
.theme-tree-depth-7 { padding-left: 176px; }
.theme-tree-depth-8 { padding-left: 200px; }

.theme-category-row {
  position: relative;
  color: var(--ink);
  font-size: 13px;
}

.theme-category-toggle-row {
  width: 100%;
  border: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.theme-category-toggle-row:focus-visible {
  outline: 3px solid rgba(49, 91, 215, 0.24);
  outline-offset: -2px;
}

.theme-category-row:hover,
.theme-category-resource:hover {
  background: #f8fafc;
}

.theme-category-row > strong,
.theme-category-name {
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-category-count {
  margin-left: auto;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
}

.theme-category-source-badge {
  display: inline-block;
  padding: 0 5px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}

.theme-category-source-badge.badge-original {
  color: #8b5cf6;
  background: #f3f0ff;
}

.theme-category-source-badge.badge-custom {
  color: #0d9488;
  background: #f0fdfa;
}

.theme-tree-toggle {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: #94a3b8;
  background: transparent;
  cursor: pointer;
}

.theme-tree-toggle:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.theme-category-children[hidden] {
  display: none;
}

.theme-category-resource {
  min-width: 0;
  color: #475467;
  font-size: 13px;
}

.theme-category-resource > span:not(.resource-icon) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-resource-display-name {
  flex: 0 1 auto;
  color: var(--ink);
  font-weight: 600;
}

.theme-resource-identifier {
  min-width: 0;
  flex: 1 1 auto;
  color: var(--muted);
}

.theme-category-row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 120ms ease;
}

.theme-category-editable-row:hover .theme-category-row-actions,
.theme-category-editable-row:focus-within .theme-category-row-actions {
  opacity: 1;
}

.theme-category-action-icon {
  width: 26px;
  height: 26px;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #64748b;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: all 150ms ease;
}

.theme-category-remove-icon {
  width: 14px;
  height: 14px;
}

.theme-category-action-icon:hover {
  color: var(--brand);
  border-color: var(--line-strong);
  background: #f1f5f9;
}

.theme-category-menu {
  position: fixed;
  inset: auto;
  z-index: 20;
  min-width: 132px;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}

.theme-category-menu button {
  width: 100%;
  display: block;
  padding: 7px 10px;
  border: 0;
  border-radius: 4px;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
  text-align: left;
}

.theme-category-menu button:hover {
  color: var(--brand);
  background: #f1f5f9;
}

.theme-category-menu button.danger {
  color: var(--danger);
}

.theme-category-menu button.danger:hover {
  background: var(--danger-soft);
}

.theme-category-inline-name {
  width: min(260px, 100%);
  min-height: 30px;
}

.theme-category-dialog {
  z-index: 110;
  width: min(560px, calc(100vw - 40px));
  max-height: min(680px, calc(100vh - 48px));
  padding: 0;
}

.theme-move-category-tree {
  max-height: 360px;
  display: grid;
  gap: 4px;
  overflow: auto;
  margin-top: 10px;
}

.theme-move-category-choice {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.theme-move-category-choice .choice-control {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  padding: 0;
}

.theme-move-category-choice:hover {
  background: #f5f7fb;
}

.task-trigger-primary {
  color: var(--ink);
  font-weight: 600;
}

.task-name-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.task-name-cell > strong,
.task-scope-cell,
.task-time-line,
.task-result-cell > * {
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-name-cell > strong,
.task-time-line,
.task-result-cell > * {
  min-width: 0;
  max-width: 100%;
}

.task-result-cell > * {
  display: block;
}

.task-name-cell > strong,
.task-scope-cell,
.task-result-cell > * {
  white-space: nowrap;
}

.task-category-secondary {
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-scope-cell {
  color: #475467;
}

.task-status-cell,
.task-result-cell,
.task-time-cell {
  vertical-align: middle;
}

.task-time-cell {
  min-width: 176px;
}

.task-time-line {
  line-height: 1.55;
  white-space: nowrap;
}

.task-time-start {
  color: #344054;
  font-weight: 600;
}

.task-time-end {
  color: #667085;
}

.task-time-placeholder {
  color: #667085;
  font-weight: 400;
}

.task-result-cell {
  max-width: 240px;
}

.task-result-primary {
  overflow: hidden;
  color: #475467;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-result-code {
  margin-top: 4px;
  color: #98a2b3;
}

.task-follow-up {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 600;
}

.task-follow-up-processing {
  color: #175cd3;
}

.task-follow-up-success {
  color: #027a48;
}

.task-follow-up-partial-success {
  color: #b54708;
}

.task-follow-up-failed {
  color: #b42318;
}

.task-follow-up-default {
  color: var(--muted);
}

.task-summary-window {
  margin-top: 6px;
  color: #98a2b3;
}

.task-overview-error {
  grid-column: 1 / -1;
}

.task-detail-section {
  overflow: hidden;
}

.drawer.task-detail-drawer {
  width: min(560px, 100vw);
}

.drawer.stats-call-detail-drawer {
  width: min(720px, 100vw);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stats-call-detail-drawer > .drawer-head {
  flex: none;
}

.stats-call-detail-drawer > .drawer-head > div {
  min-width: 0;
}

.stats-call-detail-drawer > .drawer-head h2 {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 17px;
}

.stats-call-detail-drawer > .drawer-body {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 16px;
  padding-top: 16px;
  overflow: auto;
}

.stats-call-detail-meta {
  display: grid;
  flex: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 24px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--page);
}

.stats-call-detail-meta-item {
  min-width: 0;
}

.stats-call-detail-meta dt {
  color: var(--muted);
  font-size: 12px;
}

.stats-call-detail-meta dd {
  min-width: 0;
  min-height: 24px;
  display: flex;
  align-items: center;
  margin: 6px 0 0;
  color: var(--ink);
  white-space: normal;
  overflow-wrap: anywhere;
}

.stats-call-detail-meta dd > * {
  min-width: 0;
  max-width: 100%;
}

.stats-call-detail-meta-item--full {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.stats-call-detail-meta-item--full dt {
  flex: none;
}

.stats-call-detail-meta-item--full dd {
  min-width: 0;
  min-height: 0;
  margin: 0;
  font-size: 12px;
}

.stats-call-detail-viewer {
  min-height: 200px;
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.stats-call-detail-payload {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: auto;
  background: var(--page);
}

.stats-call-detail-toolbar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.stats-call-detail-toolbar .segmented {
  flex: none;
}

.stats-call-detail-actions {
  display: flex;
  flex: none;
}

.stats-call-detail-truncated {
  flex: none;
  margin: 0;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--warning);
  background: var(--warning-soft);
}

.stats-call-detail-json {
  min-height: 0;
  flex: 1;
  margin: 0;
  overflow: auto;
  padding: 16px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.65;
  tab-size: 2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

.stats-call-detail-json:focus-visible {
  outline-offset: -3px;
}

@media (max-width: 600px) {
  .drawer.stats-call-detail-drawer {
    padding: 16px;
  }

  .stats-call-detail-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    padding: 12px;
  }

  .stats-call-detail-meta-item--full {
    display: block;
  }

  .stats-call-detail-meta-item--full dd {
    margin-top: 6px;
  }

  .stats-call-detail-toolbar {
    padding: 8px;
  }

  .stats-call-detail-json {
    padding: 12px;
  }
}

.stats-detail-row {
  cursor: pointer;
}

.stats-detail-row:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}


.task-detail-section .card-head,
.task-detail-section .card-body {
  padding: 14px 12px;
}

.task-detail-definition {
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px 16px;
}

.task-detail-id-row {
  min-width: 0;
  flex-wrap: nowrap;
}

.task-detail-id-row code {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn.task-copy-button {
  width: 24px;
  min-height: 24px;
  flex: 0 0 24px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.task-copy-button svg {
  width: 13px;
  height: 13px;
}

.task-relation-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.task-child-relations {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.task-child-relation {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.task-child-relation .task-relation-link {
  overflow-wrap: anywhere;
  min-width: 0;
  text-align: left;
}

.task-relation-link,
.toast-copy .btn.link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.task-detail-actions {
  justify-content: flex-end;
}

.task-detail-process {
  margin: 0;
  color: #475467;
}

.task-result-head {
  align-items: center;
}

.task-result-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.task-result-conclusion, .task-result-caption {
  margin: 0 0 8px;
  color: var(--text);
  line-height: 1.6;
}
.task-result-caption { font-size: 13px; color: var(--muted); }
.task-result-counts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.task-result-count {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px;
  padding: 4px 9px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--page); color: var(--muted); font-size: 13px; line-height: 22px;
}
.task-result-count strong { color: var(--ink); font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.task-result-count small { font-size: 12px; }
.task-result-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--muted); }
.task-result-count.ok .task-result-dot { background: var(--success); }
.task-result-count.bad .task-result-dot { background: var(--danger); }
.task-result-count.warn .task-result-dot { background: var(--warning); }
.task-reason-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 12px; }
.task-reason-head strong { min-width: 0; overflow-wrap: anywhere; }
.task-reason-head .caption { flex: none; }
.task-diagnostic-group {
  color: var(--ink); margin-top: 12px; padding: 12px;
  border: 1px solid var(--line); border-left: 3px solid #da8d78; border-radius: 6px;
}
.task-diagnostic-action { margin: 5px 0 8px; color: var(--muted); font-size: 13px; }
.task-result-disclosure { margin-top: 10px; }
.task-result-disclosure > summary { color: var(--brand); font-size: 13px; cursor: pointer; }
.task-result-disclosure > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.task-result-disclosure[open] > summary { margin-bottom: 10px; }
.task-evidence { background: var(--page); border-radius: 6px; padding: 12px; font-size: 12px; }
.task-evidence .definition-grid { grid-template-columns: 90px minmax(0, 1fr); gap: 8px 12px; align-items: start; }
.task-evidence-variant + .task-evidence-variant { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.task-evidence .value { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-delta-groups { margin-top: 12px; }
.task-delta-search { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; min-width: 0; }
.task-delta-search .field { flex: 1; min-width: 0; }
.task-delta-search .btn { flex: none; padding-inline: 10px; }
.task-object-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.task-object-note {
  flex: 0 1 auto;
  max-width: 50%;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
}
.task-object-identity { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.task-object-identity > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; font-size: 13px; }
.task-object-identity strong { font-weight: 500; }
.task-delta-table-body { padding: 0 !important; }
.task-delta-group .task-delta-pager { padding-inline: 0; }
.task-delta-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}

.stats-filter-grid {
  grid-template-columns: minmax(170px, 1fr) repeat(3, minmax(150px, 1fr)) auto;
}

.stats-filter-grid.custom-range {
  grid-template-columns: minmax(150px, 0.8fr) repeat(2, minmax(150px, 0.9fr)) repeat(3, minmax(140px, 1fr)) auto;
}

.stats-filter-actions {
  align-self: end;
  padding-top: 0;
  border-top: 0;
}

.stats-metric-card {
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background-color 150ms ease;
}

.stats-metric-card:hover,
.stats-metric-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(49, 91, 215, 0.1);
}

.stats-metric-card.active .muted,
.stats-metric-card.active .value {
  color: var(--brand);
}

.stats-metric-action {
  display: block;
  margin-top: 10px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}

.stats-trend-card {
  overflow: hidden;
}

.stats-trend-head {
  margin-bottom: 0;
}

.stats-trend-scroll {
  display: flex;
  flex: 1;
}

.stats-trend-chart {
  --trend-gap: clamp(12px, 3vw, 34px);
  --trend-column-width: max(64px, var(--trend-value-width, 0px));
  position: relative;
  min-height: 220px;
  width: 100%;
  min-width: calc(36px + var(--trend-count, 1) * var(--trend-column-width) + (var(--trend-count, 1) - 1) * var(--trend-gap));
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(var(--trend-count, 1), minmax(0, 1fr));
  align-items: stretch;
  gap: var(--trend-gap);
  padding: 30px 18px 18px;
  font-size: var(--trend-value-font-size, 12px);
}

.stats-trend-chart--percentage {
  --trend-value-font-size: 11px;
}

.stats-trend-chart::before {
  position: absolute;
  right: 18px;
  bottom: 43px;
  left: 18px;
  border-top: 1px solid var(--line);
  content: "";
}

.stats-trend-chart.stats-trend-chart--dense {
  --trend-column-width: var(--trend-value-width, 0px);
  --trend-gap: clamp(4px, 0.8vw, 10px);
}

.stats-trend-chart.stats-trend-chart--scrollable {
  --trend-column-width: max(36px, var(--trend-value-width, 0px));
  --trend-gap: 6px;
}

.stats-trend-column {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(120px, 1fr) 18px;
  align-items: end;
  justify-items: center;
  gap: 7px;
  border-radius: 4px;
  color: var(--muted);
  font-size: 12px;
}

.stats-trend-value {
  position: absolute;
  bottom: calc(var(--bar-height) + 7px);
  left: 50%;
  transform: translateX(-50%);
  color: #344054;
  font-size: var(--trend-value-font-size, 12px);
  font-weight: 600;
  white-space: nowrap;
}

.stats-trend-bar-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.stats-trend-bar {
  width: min(52px, 76%);
  height: var(--bar-height);
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, #6485e5, #315bd7);
}

.stats-trend-chart--dense .stats-trend-bar {
  width: min(30px, 72%);
}

.stats-trend-chart--scrollable .stats-trend-bar {
  width: min(22px, 72%);
}

.stats-trend-level-empty,
.stats-trend-level-0 { --bar-height: 2px; }
.stats-trend-level-1 { --bar-height: 5%; }
.stats-trend-level-2 { --bar-height: 10%; }
.stats-trend-level-3 { --bar-height: 15%; }
.stats-trend-level-4 { --bar-height: 20%; }
.stats-trend-level-5 { --bar-height: 25%; }
.stats-trend-level-6 { --bar-height: 30%; }
.stats-trend-level-7 { --bar-height: 35%; }
.stats-trend-level-8 { --bar-height: 40%; }
.stats-trend-level-9 { --bar-height: 45%; }
.stats-trend-level-10 { --bar-height: 50%; }
.stats-trend-level-11 { --bar-height: 55%; }
.stats-trend-level-12 { --bar-height: 60%; }
.stats-trend-level-13 { --bar-height: 65%; }
.stats-trend-level-14 { --bar-height: 70%; }
.stats-trend-level-15 { --bar-height: 75%; }
.stats-trend-level-16 { --bar-height: 80%; }
.stats-trend-level-17 { --bar-height: 85%; }
.stats-trend-level-18 { --bar-height: 90%; }
.stats-trend-level-19 { --bar-height: 95%; }
.stats-trend-level-20 { --bar-height: 100%; }

.stats-trend-level-0 .stats-trend-bar,
.stats-trend-level-empty .stats-trend-bar {
  border-radius: 999px;
  background: #b9c8ec;
}

.stats-trend-date {
  white-space: nowrap;
}

.stats-trend-label--sampled-out {
  visibility: hidden;
}

.stats-trend-empty {
  min-height: 210px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.stats-overview-state {
  margin: 0;
}

.stats-panel {
  display: grid;
  gap: 16px;
}

.stats-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.stats-page-tabs {
  border-bottom: 0;
}

.stats-date-control {
  margin-left: auto;
}

.stats-details-page {
  display: grid;
  gap: 16px;
}

.stats-date-filters {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.stats-date-filters > .form-row {
  flex: 0 0 auto;
}

.stats-date-filters > .stats-date-range-field {
  width: min(128px, 100%);
}

.stats-custom-period > .stats-date-period-field {
  width: 128px;
  max-width: 100%;
  flex: 0 0 auto;
}

.stats-custom-period {
  display: flex;
  align-items: end;
  gap: 10px;
}

.stats-custom-period[hidden] {
  display: none;
}

.stats-period-separator {
  padding-bottom: 9px;
  color: var(--muted);
}

.stats-overview-card {
  overflow: hidden;
  clip-path: inset(0 round var(--radius));
}

.stats-overview-layout {
  min-height: 288px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
}

.stats-summary-stack {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.stats-summary-card {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 68px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  background: #fff;
  cursor: pointer;
}

.stats-summary-card .value {
  font-size: 26px;
}

.stats-summary-card:hover,
.stats-summary-card.active {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.stats-summary-card.active .muted,
.stats-summary-card.active .value {
  color: var(--brand);
}

.stats-chart-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.stats-chart-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 0;
}

.stats-chart-heading h2 {
  margin: 0;
}

.stats-analysis-card,
.stats-detail-card {
  overflow: hidden;
}

.stats-module-head {
  min-height: 64px;
}

.stats-analysis-filters {
  position: relative;
  z-index: 3;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.stats-drill-link {
  font-weight: 700;
}

.stats-identity-cell {
  display: grid;
  gap: 2px;
}

.stats-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.stats-sort-button.active {
  color: var(--brand);
}

.stats-sort-indicator {
  color: var(--muted);
  font-size: 12px;
}

.stats-sort-button.active .stats-sort-indicator {
  color: var(--brand);
}

.service-stats-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.service-stats-panel-head h2 {
  margin: 0;
}

.stats-detail-head {
  gap: 16px;
}

.stats-detail-export {
  flex: none;
  margin-left: auto;
}

.stats-detail-inline-filters {
  flex: 1;
  min-width: 0;
}

@media (max-width: 980px) {
  .stats-page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .stats-date-control {
    margin-left: 0;
  }

  .stats-detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats-detail-inline-filters {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 1100px) {
  .stats-overview-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .stats-date-filters,
  .stats-custom-period {
    align-items: stretch;
    flex-direction: column;
  }

  .stats-date-filters > .form-row,
  .stats-custom-period > .form-row {
    width: 100%;
  }

  .stats-period-separator {
    display: none;
  }

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

  .stats-summary-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stats-analysis-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .stats-detail-inline-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .stats-detail-inline-filters .filter-bar-actions {
    justify-content: flex-start;
  }
.stats-analysis-filters .filter-bar-fields,
.stats-analysis-filters .filter-bar-field,
.stats-detail-inline-filters .filter-bar-fields,
.stats-detail-inline-filters .filter-select {
    width: 100%;
  }

  .stats-analysis-filters .filter-select,
  .stats-detail-inline-filters .filter-select {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex-basis: auto;
  }
}

.api-key-modal {
  width: min(680px, calc(100vw - 40px));
}

.api-key-modal > .modal-body {
  padding-inline: 6px;
}

.api-key-editor-form,
.api-key-preview {
  display: grid;
  gap: 12px;
}

.api-key-preview {
  margin-top: 4px;
}

.api-key-preview-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.api-key-preview-row code {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 7px;
  color: #344054;
  background: #f5f7fa;
}

.api-key-create-help {
  margin: 0;
}

.generated-api-key {
  min-height: auto;
  margin-top: 12px;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-all;
}

.semantics-modal {
  width: min(1120px, calc(100vw - 40px));
  height: min(860px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

html.semantics-modal-open,
html.semantics-modal-open body {
  overflow: hidden;
}

.scope-modal {
  width: min(1120px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.scope-modal .modal-body {
  display: grid;
  gap: 18px;
  overflow: auto;
}

.scope-config-panel {
  display: grid;
  gap: 14px;
}

.scope-config-panel textarea {
  min-height: 150px;
}

.sync-config-modal {
  width: min(1120px, calc(100vw - 40px));
  height: min(860px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  color: var(--text);
  font-size: 14px;
}

.sync-config-modal .modal-head {
  flex: 0 0 auto;
  min-height: 72px;
  margin: 0;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.sync-config-modal .modal-head h2 {
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
}

.sync-config-body {
  flex: 1;
  min-height: 0;
  display: grid;
  gap: 22px;
  overflow: auto;
  padding: 26px 24px;
}

.sync-config-loading-body {
  min-height: 0;
  display: flex;
  flex: 1;
}

.sync-config-loading-body > .asset-detail-skeleton {
  width: 100%;
}

.sync-config-modal > .modal-actions {
  flex: 0 0 auto;
  margin: 0;
  padding: 16px 24px;
  background: #fff;
}

.sync-config-section {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.sync-config-section > h3 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.sync-config-section-content {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.scope-choice-card,
.attribute-config-card,
.schedule-card {
  position: relative;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.scope-choice-card.has-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger);
}

.scope-choice-head,
.scope-choice-categories,
.inline-choice,
.attribute-config-head,
.attribute-group-head,
.schedule-row,
.schedule-options,
.schedule-enabled,
.checkbox-chip,
.probe-number-row {
  display: flex;
  align-items: center;
}

.scope-choice-head {
  gap: 24px;
}

.scope-choice-head > strong {
  min-width: 95px;
  font-weight: 600;
}

.inline-choice,
.schedule-enabled,
.checkbox-chip {
  gap: 7px;
}

.inline-choice input,
.attribute-row input,
.schedule-enabled input,
.checkbox-chip input {
  width: auto;
  min-height: auto;
  padding: 0;
}

.choice-control[type="radio"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 0;
  appearance: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease;
}

.choice-control[type="radio"]:checked,
input[type="radio"]:checked {
  border: 5px solid var(--brand);
}

.choice-control[type="checkbox"],
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 0;
  appearance: auto;
  accent-color: var(--brand);
  cursor: pointer;
}

.choice-control:focus-visible,
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(49, 91, 215, 0.14);
}

.choice-control:disabled,
input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.inline-choice span {
  white-space: nowrap;
}

.inline-choice input:checked + span,
.checkbox-chip input:checked + span {
  color: var(--brand);
}

.scope-choice-divider,
.schedule-divider {
  height: 1px;
  margin: 14px 0;
  background: var(--line);
}

.scope-choice-categories {
  min-height: 32px;
  gap: 10px;
}

.scope-all-summary {
  min-height: 32px;
  display: flex;
  align-items: center;
  color: #344054;
  font-weight: 500;
}

.scope-choice-categories > .muted {
  min-width: 95px;
}

.scope-choice-error {
  margin: 6px 0 0 105px;
}

.category-chips {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.category-chip,
.checkbox-chip {
  padding: 5px 10px;
  background: var(--brand-soft);
  border: 1px solid #c7d7fe;
  border-radius: 999px;
}

.category-chip {
  color: var(--brand);
  min-height: 24px;
  padding: 2px 8px;
  font-size: 12px;
  line-height: 18px;
}

.checkbox-chip {
  color: var(--text);
  font-weight: 400;
}

.link-button {
  padding: 2px;
  color: var(--brand);
  background: transparent;
  border: 0;
  font-weight: 500;
}

.attribute-config-card {
  padding: 0;
  overflow: hidden;
}

.attribute-config-head {
  min-height: 54px;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.attribute-config-toggle,
.attribute-group-toggle {
  min-width: 0;
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.attribute-config-toggle {
  flex: 1;
}

.attribute-config-toggle > strong {
  color: var(--ink);
  font-weight: 600;
}

.attribute-config-toggle .pill {
  color: var(--muted);
  font-weight: 400;
}

.attribute-caret {
  width: 12px;
  flex: 0 0 12px;
  color: var(--muted);
  text-align: center;
}

.attribute-search {
  width: 198px;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
}

.attribute-search .icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: #667085;
}

.attribute-search-input {
  width: 100%;
  flex: 1;
  min-width: 0;
  min-height: 30px;
  padding: 0;
  border: 0;
  outline: 0;
}

.attribute-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(49, 91, 215, 0.14);
}

.attribute-search-input:focus-visible {
  outline: 0;
}

.attribute-search-empty {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.attribute-table-head,
.attribute-row {
  display: grid;
  grid-template-columns: 74px 74px minmax(180px, 1fr) minmax(220px, 1.5fr);
  align-items: center;
  min-height: 44px;
  gap: 12px;
  padding: 0 16px;
}

.attribute-table-head {
  min-height: 40px;
  color: var(--muted);
  background: #fafbfc;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
}

.attribute-table-head > span:nth-child(-n + 2),
.attribute-row > input:nth-child(-n + 2) {
  justify-self: start;
  margin: 0;
}

.attribute-row {
  border-top: 1px solid #edf0f4;
}

.attribute-row code {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attribute-group-actions .link-button:disabled {
  color: var(--muted);
  cursor: default;
}

.attribute-group-head {
  min-height: 42px;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  background: #fcfcfd;
}

.attribute-group-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.attribute-group-toggle {
  flex: 1;
}

.attribute-group-toggle > strong {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

.attribute-group-toggle > .muted {
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
}

.attribute-group-actions {
  flex: 0 0 auto;
}

.attribute-label {
  width: max-content;
  min-width: 0;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attribute-label.mandatory {
  color: #c95a18;
}

.schedule-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.schedule-card > strong {
  color: #344054;
  font-size: 14px;
  font-weight: 600;
}

.schedule-row {
  gap: 12px;
  min-height: 42px;
  justify-content: flex-start;
}

.schedule-row-label,
.schedule-options > span:first-child {
  min-width: 92px;
  color: #475467;
  font-size: 13px;
  font-weight: 400;
}

.schedule-editor {
  flex: 0 1 auto;
  display: flex;
  min-width: 0;
  gap: 10px;
  flex-wrap: wrap;
}

.schedule-frequency {
  width: 120px;
  flex: 0 0 120px;
}

.schedule-editor-picker > .gw-select {
  position: relative;
  width: 160px;
  min-width: 160px;
  flex: 0 0 160px;
}

.schedule-editor-picker {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.schedule-editor-picker.minute > .gw-select {
  width: 160px;
  min-width: 160px;
  flex-basis: 160px;
}

.picker-check {
  color: var(--brand);
  font-weight: 700;
}

.schedule-options {
  flex-wrap: wrap;
  gap: 10px;
}

.immediate-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

.schedule-card .schedule-divider {
  margin: 0;
}

.probe-mode-row .btn {
  margin-left: auto;
}

.schedule-mode-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  color: #344054;
}

.probe-custom-schedule {
  padding-left: 104px;
}

.schedule-enabled {
  margin-left: auto;
}

.probe-number-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  align-items: end;
  gap: 12px;
}

.probe-number-row:has(.dataset-probe-type-group) {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.dimension-probe-configuration > .probe-number-row {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.dataset-probe-rules {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.dataset-probe-rules-label {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475467;
  font-size: 13px;
}

.dataset-probe-type-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f9fafb;
}

.dataset-probe-master-row,
.dataset-probe-type-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dataset-probe-type-disclosure {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.dataset-probe-type-disclosure > strong {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.dataset-probe-type-disclosure:hover > strong {
  color: var(--brand);
}

.dataset-probe-type-caret {
  flex: 0 0 auto;
}

.dataset-probe-type-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-left: 22px;
}

.dataset-probe-type-controls > .compact-number-field {
  flex: 0 0 auto;
}

.dataset-probe-mode-options,
.dataset-probe-mode-controls {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
}

.dataset-probe-mode-controls {
  flex: 0 0 100%;
}

.dataset-probe-mode-controls > .compact-number-field {
  flex: 0 0 auto;
}

.dataset-probe-type-group[data-probe-type="numeric"] .dataset-probe-mode-options {
  flex: 0 0 100%;
}

.dataset-probe-type-group > .checkbox-chip,
.probe-type-option-row {
  align-self: flex-start;
}

.probe-type-option-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.help-tooltip {
  width: 18px;
  height: 18px;
}

.help-tooltip .icon {
  width: 14px;
  height: 14px;
}

.probe-number-row .schedule-enabled {
  min-height: 36px;
  margin-left: 0;
}

.compact-number-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.compact-number-field > span {
  min-height: 20px;
  display: flex;
  align-items: center;
}

.inline-number-field {
  width: max-content;
  max-width: 100%;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.inline-number-field > span {
  min-height: 36px;
}

.inline-number-field > .field {
  width: 104px;
  min-width: 104px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-row input {
  width: 16px;
  min-height: 16px;
}

.semantics-modal .modal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  padding: 24px 20px 18px;
}

.semantics-modal > .modal-head {
  flex: none;
  min-height: 64px;
  margin: 0;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.semantics-modal > .modal-head h2 {
  font-size: 17px;
  font-weight: 600;
}

.modal-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.semantic-task-link,
.semantic-task-link:hover,
.semantic-task-link:focus-visible {
  text-decoration: none;
}

.semantics-modal [aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.52;
}

.semantic-update-dropdown .action-menu {
  width: 180px;
}

.synonym-tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
}

.synonym-tabs button {
  position: relative;
  min-height: 40px;
  padding: 0 2px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 600;
}

.synonym-tabs button.active {
  color: var(--brand);
}

.synonym-tabs button.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--brand);
}

.synonym-toolbar,
.synonym-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.semantic-update-status {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.semantics-llm-only {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
}

.synonym-search-wrap {
  position: relative;
  width: min(440px, 100%);
}

.synonym-search-wrap > .icon {
  position: absolute;
  top: 10px;
  left: 10px;
  color: var(--muted);
}

.synonym-search-wrap .search-input {
  width: 100%;
  padding-left: 34px;
}

.synonym-list {
  min-height: 120px;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow-y: auto;
  clip-path: inset(0 round 7px);
}

.synonym-row {
  min-height: 62px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 74px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.semantics-modal.is-editing .synonym-row {
  grid-template-columns: 250px minmax(0, 1fr) max-content max-content;
  column-gap: 2px;
}

.semantics-modal.is-editing .dataset-summary-row {
  grid-template-columns: 250px minmax(0, 1fr) max-content;
}

.synonym-row:last-child {
  border-bottom: 0;
}

.synonym-asset,
.synonym-value {
  min-width: 0;
}

.synonym-asset strong,
.synonym-asset code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.synonym-asset code {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.synonym-value {
  color: var(--text);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.semantic-source-pill {
  justify-content: center;
  text-align: center;
}

.semantics-modal.is-editing .semantic-source-pill {
  margin-left: 10px;
}

.synonym-editor {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
}

.dataset-summary-row-editor {
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  overflow: auto;
  resize: none;
  scrollbar-width: none;
  white-space: pre;
}

.dataset-summary-row-editor::-webkit-scrollbar {
  display: none;
}

.synonym-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.synonym-row-actions .btn {
  flex: none;
  min-height: 32px;
}

.synonym-restore,
.synonym-delete {
  padding: 0 2px;
}

.synonym-row-action-placeholder {
  width: 66px;
  min-height: 1px;
}

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

.semantic-page-number {
  margin-right: 4px;
}

.semantics-modal-footer {
  flex: none;
  margin: 0;
  min-height: 66px;
  padding: 14px 18px;
  background: #fff;
}

.synonym-dirty-count {
  color: #b54708;
  font-size: 12px;
  font-weight: 600;
}

.synonym-picker-backdrop,
.synonym-unsaved-backdrop {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.44);
}

.synonym-picker-card,
.synonym-unsaved-card {
  width: min(620px, 100%);
  max-height: min(620px, calc(100vh - 80px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--shadow);
}

.synonym-picker-card {
  z-index: 110;
}

.synonym-picker-head,
.synonym-picker-foot,
.synonym-unsaved-head,
.synonym-unsaved-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.synonym-picker-head,
.synonym-unsaved-head {
  border-bottom: 1px solid var(--line);
}

.synonym-picker-head h3,
.synonym-unsaved-head h3 {
  margin: 0;
  font-size: 15px;
}

.synonym-picker-head p {
  margin-top: 4px;
  font-size: 12px;
}

.synonym-picker-foot,
.synonym-unsaved-foot {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.synonym-picker-foot {
  gap: 8px;
  padding-right: 12px;
  padding-left: 12px;
}

.synonym-picker-summary {
  flex: none;
  white-space: nowrap;
}

.synonym-picker-body,
.synonym-unsaved-body {
  min-height: 0;
  padding: 16px;
  overflow: auto;
}

.synonym-picker-body {
  display: flex;
  flex-direction: column;
}

.synonym-picker-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.synonym-picker-title p {
  margin: 0;
  font-size: 12px;
  white-space: nowrap;
}

.synonym-picker-body > .search-input {
  flex: none;
}

.synonym-picker-list {
  min-height: 0;
  display: grid;
  gap: 8px;
  margin-top: 12px;
  overflow-y: auto;
}

.synonym-picker-item {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease;
}

.synonym-picker-item:not(:disabled):hover {
  border-color: #9db5f4;
  background: var(--brand-soft);
}

.synonym-picker-item:disabled {
  color: var(--muted);
  background: #f9fafb;
}

.synonym-picker-item code {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.synonym-picker-more {
  justify-self: center;
  margin-top: 2px;
}

.toast-root {
  position: fixed;
  top: 74px;
  right: 18px;
  z-index: 150;
  width: min(360px, calc(100vw - 36px));
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  min-width: 0;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 24px;
  gap: 9px;
  align-items: start;
  padding: 12px 14px;
  color: #175cd3;
  background: #eff8ff;
  border: 1px solid #b2ddff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  pointer-events: auto;
  animation: toast-in 180ms ease-out;
}

.toast-success {
  color: #05603a;
  background: #ecfdf3;
  border-color: #a6f4c5;
}

.toast-warning {
  color: #93370d;
  background: #fffaeb;
  border-color: #fedf89;
}

.toast-error {
  color: #b42318;
  background: #fef3f2;
  border-color: #fecdca;
}

.toast-icon {
  display: grid;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  place-items: center;
}

.toast-icon .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.toast-copy {
  min-width: 0;
}

.toast-title {
  display: block;
  margin-bottom: 1px;
  color: currentColor;
  font-size: 14px;
  line-height: 20px;
}

.toast-content {
  color: currentColor;
  font-size: 13px;
  line-height: 20px;
  overflow-wrap: anywhere;
}

.toast-content .btn.link {
  display: inline;
  margin-inline-start: 6px;
  vertical-align: baseline;
  white-space: nowrap;
}

.toast-close {
  display: grid;
  width: 24px;
  height: 24px;
  margin: -2px -4px 0 0;
  padding: 0;
  place-items: center;
  color: currentColor;
  background: transparent;
  border: 0;
  border-radius: 4px;
  opacity: 0.68;
  transition: background-color 160ms ease, opacity 160ms ease;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.58);
  opacity: 1;
}

.toast-close .icon {
  width: 16px;
  height: 16px;
}

.toast-leaving {
  pointer-events: none;
  animation: toast-out 160ms ease-in forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateX(12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast,
  .toast-leaving {
    animation: none;
  }
}

.session-error,
.denied-card,
.boot-card {
  width: min(520px, calc(100vw - 32px));
  margin: 14vh auto;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.denied-card {
  text-align: center;
}

.denied-card .state-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 50%;
}

.denied-card .state-icon .icon {
  width: 24px;
  height: 24px;
}

.denied-card .btn {
  margin-top: 18px;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.button-spinner {
  width: 14px;
  height: 14px;
  border-width: 2px;
  border-color: currentColor;
  border-right-color: transparent;
}

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

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 1.6s;
  }
}

@media (max-width: 1050px) {
  .tabs-shell {
    width: 208px;
  }

  .workspace {
    margin-left: 208px;
    padding-right: 20px;
    padding-left: 20px;
  }

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

  .stats-filter-grid,
  .stats-filter-grid.custom-range,
  .task-filter-grid,
  .task-filter-grid.custom-range {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .theme-asset-picker {
    width: calc(100vw - 40px);
    height: calc(100vh - 40px);
  }

  .theme-picker-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(160px, 0.65fr) minmax(320px, 1.35fr);
    overflow: hidden;
  }
}

@media (max-width: 760px) {
  .header-main {
    gap: 10px;
    padding: 0 16px;
  }

  .header-divider,
  .tenant-code {
    display: none;
  }

  .brand {
    min-width: auto;
    font-size: 16px;
    white-space: nowrap;
  }

  .tenant-switcher strong {
    max-width: clamp(60px, calc(100vw - 260px), 150px);
  }

  .tenant-switcher {
    gap: 6px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .tenant-menu {
    right: 0;
    left: auto;
    min-width: min(320px, calc(100vw - 32px));
  }

  .tabs-shell {
    top: 58px;
    right: 0;
    bottom: auto;
    width: auto;
    display: flex;
    overflow-x: auto;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .top-tabs {
    width: max-content;
    flex-direction: row;
  }

  .top-tab {
    white-space: nowrap;
  }

  .system-subnav {
    position: fixed;
    top: 108px;
    right: 12px;
    z-index: 50;
    min-width: 160px;
    max-width: calc(100vw - 24px);
    margin-left: 0;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 7px;
    box-shadow: var(--shadow);
  }

  .workspace {
    margin-left: 0;
    padding: 128px 16px 40px;
  }

  .workspace.workspace-standalone {
    padding-top: 88px;
  }

  .page-header,
  .panel-toolbar,
  .api-key-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .grid-2,
  .grid-3,
  .system-db-grid,
  .tenant-jdbc-grid,
  .llm-config-grid,
  .stats-filter-grid,
  .stats-filter-grid.custom-range,
  .task-filter-grid,
  .task-filter-grid.custom-range,
  .tool-layout,
  .tool-explorer,
  .api-debug-layout,
  .row-auth-layout,
  .permission-layout,
  .theme-layout,
  .asset-layout {
    grid-template-columns: 1fr;
  }

  .asset-layout {
    height: auto;
    min-height: 0;
  }

  .theme-basic-fields {
    grid-template-columns: 1fr;
  }

  .theme-editor-section-head,
  .theme-category-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .theme-editor-section-head .segmented {
    width: 100%;
  }

  .theme-editor-section-head .segmented button {
    flex: 1;
  }

  .theme-category-toolbar .search-input {
    width: 100%;
  }

  .theme-category-row-actions {
    opacity: 1;
  }

  .theme-resource-row-actions {
    opacity: 1;
  }

  .theme-asset-picker {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
  }

  .theme-picker-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(180px, 0.7fr) minmax(300px, 1.3fr);
    overflow: hidden;
  }

  .theme-picker-page-actions {
    flex-wrap: wrap;
  }

  .theme-picker-page-summary {
    width: 100%;
    text-align: right;
  }

  .theme-picker-asset-pane > .cursor-pager {
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .theme-picker-asset-pane > .cursor-pager .cursor-pager-leading {
    grid-column: 1 / -1;
  }

  .theme-picker-asset-pane > .cursor-pager .list-footer-spacer {
    display: none;
  }

  .theme-picker-asset-pane > .cursor-pager .btn {
    width: 100%;
    min-width: 0;
  }

  .theme-picker-asset-pane > .cursor-pager > .btn:last-child {
    grid-row: 2;
    grid-column: 3;
  }

  .theme-picker-asset-pane > .cursor-pager .cursor-pager-position {
    grid-row: 3;
    grid-column: 1 / 3;
    justify-self: end;
  }

  .theme-picker-asset-pane > .cursor-pager .cursor-pager-total {
    grid-row: 3;
    grid-column: 3;
    align-self: center;
  }

  .theme-asset-picker .modal-actions {
    flex-wrap: wrap;
  }

  .theme-picker-selection-summary {
    width: 100%;
  }

  .stats-trend-chart {
    gap: 14px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .row-auth-layout {
    height: auto;
    min-height: 0;
  }

  .row-auth-dataset-list {
    max-height: 260px;
  }

  .row-auth-rule-results {
    max-height: 520px;
  }

  .asset-catalog-scroll {
    max-height: 260px;
  }

  .asset-layout .fixed-list-body {
    max-height: 520px;
  }

  .llm-config-grid > .form-row,
  .llm-config-grid > .llm-base-url,
  .llm-api-key,
  .llm-model,
  .llm-max-tokens,
  .llm-tuning-title,
  .llm-tuning-title ~ .form-row,
  .database-source-card,
  .db-type-field,
  .db-host-field,
  .db-port-field,
  .db-credential-field {
    grid-column: auto;
  }

  .database-source-fields {
    grid-template-columns: 1fr;
  }

  .tenant-jdbc-grid > .form-row:nth-child(1),
  .tenant-jdbc-grid > .form-row:nth-child(2),
  .tenant-jdbc-grid > .form-row:nth-child(3),
  .tenant-jdbc-grid > .form-row:nth-child(4) {
    grid-column: auto;
  }

  .tenant-jdbc-advanced,
  .tenant-jdbc-air2-options {
    grid-template-columns: 1fr;
  }

  .system-config-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .system-config-action-group,
  .system-config-action-primary {
    width: 100%;
  }

  .system-config-action-group .btn {
    flex: 1;
  }

  .panel-toolbar > .inline-actions,
  .panel-toolbar .search-input {
    width: 100%;
  }

  .synonym-row,
  .semantics-modal.is-editing .synonym-row {
    grid-template-columns: 1fr;
  }

  .semantics-modal {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
  }

  .semantics-modal .modal-body {
    overflow-y: auto;
  }

  .semantics-modal > .modal-head {
    align-items: center;
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .semantics-modal > .modal-head h2 {
    white-space: nowrap;
  }

  .semantics-modal .modal-head-actions {
    order: 3;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    margin-left: 0;
  }

  .semantics-modal .modal-head-actions > .btn,
  .semantics-modal .modal-head-actions > .action-dropdown,
  .semantics-modal .modal-head-actions > .action-dropdown > .btn {
    width: 100%;
  }

  .semantics-modal-footer {
    flex-wrap: wrap;
  }

  .synonym-dirty-count {
    width: 100%;
  }

  .synonym-row-actions {
    justify-content: flex-start;
  }

  .synonym-toolbar,
  .synonym-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .semantic-update-status {
    white-space: normal;
  }

  .sync-config-modal {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
  }

  .sync-config-section {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .scope-choice-head,
  .scope-choice-categories,
  .schedule-row,
  .schedule-editor {
    align-items: stretch;
    flex-direction: column;
  }

  .scope-choice-head {
    gap: 10px;
  }

  .scope-choice-head > strong,
  .scope-choice-categories > .muted,
  .schedule-row > span:first-child {
    min-width: 0;
  }

  .schedule-frequency,
  .schedule-editor-picker > .gw-select {
    width: 100%;
    flex-basis: auto;
  }

  .attribute-search {
    width: 100%;
    margin-left: 0;
  }

  .schedule-editor-picker {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-enabled {
    margin-left: 0;
  }

  .probe-custom-schedule {
    padding-left: 0;
  }

  .attribute-config-card {
    overflow-x: auto;
  }

  .attribute-config-card > * {
    min-width: 720px;
  }

  .compact-number-field {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .probe-number-row {
    grid-template-columns: 1fr;
  }

  .modal-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .modal-head-actions {
    width: 100%;
    order: 3;
    flex-wrap: wrap;
    margin-left: 0;
  }

  .side-panel,
  .tool-list,
  .api-debug-sidebar,
  .row-auth-pane:first-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .api-debug-layout {
    height: auto;
  }

  .tool-explorer {
    height: auto;
  }

  .tool-list {
    max-height: 260px;
  }

  .overview-page .tool-list {
    border-bottom-left-radius: 0;
  }

  .overview-page .tool-debug-main {
    border-bottom-left-radius: calc(var(--radius) - 1px);
  }

  .tool-debug-main {
    overflow: visible;
  }

  .tool-debug-workspace {
    grid-template-columns: 1fr;
  }

  .api-debug-sidebar {
    max-height: 260px;
  }

  .api-debug-main {
    overflow: visible;
  }

  .api-debug-detail-head,
  .api-debug-response-head {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .api-debug-fields {
    grid-template-columns: 1fr;
  }

  .api-debug-fields.body {
    grid-template-columns: 1fr;
  }

  .api-debug-auth-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .api-debug-global-config {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .api-debug-global-config > .caption {
    margin-left: 0;
  }

  .api-debug-uid {
    width: 100%;
  }

  .overview-address,
  .definition-grid {
    grid-template-columns: 1fr;
  }

  .table-shell,
  .row-auth-table-scroll {
    overflow-x: auto;
  }

  .toast-root {
    right: 16px;
    left: 16px;
    width: auto;
  }
}

@media (max-width: 360px) {
  .header-main {
    gap: 8px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .tenant-switcher-icon {
    display: none;
  }

  .tenant-switcher strong {
    max-width: 60px;
  }
}

@media (max-width: 760px) {
  .column-probe-editor-modal.modal-shell > .modal-head,
  .column-probe-editor-modal.modal-shell > .modal-body,
  .column-probe-editor-modal.modal-shell > .modal-actions {
    padding-right: 16px;
    padding-left: 16px;
  }

  .sync-config-modal .sync-config-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .sync-config-modal .scope-choice-head,
  .sync-config-modal .scope-choice-categories,
  .sync-config-modal .schedule-row,
  .sync-config-modal .schedule-editor {
    align-items: stretch;
    flex-direction: column;
  }

  .probe-number-row:has(.dataset-probe-type-group) {
    grid-template-columns: 1fr;
  }

  .dataset-probe-rules {
    grid-template-columns: minmax(0, 1fr);
  }

  .dimension-probe-configuration > .probe-number-row {
    width: 100%;
    gap: 12px 20px;
  }

  .dataset-probe-type-controls {
    padding-left: 0;
  }

  .inline-number-field {
    width: max-content;
  }

  .column-probe-readonly-grid {
    grid-template-columns: 1fr;
  }

}

@container (max-width: 480px) {
  .column-probe-form-row {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 6px;
  }

  .column-probe-type-row .field {
    width: 100%;
  }

  .column-probe-boundary-controls {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .column-probe-enum-editor {
    grid-template-columns: 1fr;
    gap: 6px;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .column-probe-secondary-root > .modal-backdrop,
  .column-probe-secondary-root > .modal.column-probe-editor-modal {
    opacity: 1;
    transition: none !important;
  }

  .column-probe-secondary-root > .modal.column-probe-editor-modal {
    clip-path: none !important;
    transform: none;
  }
}

/* ---- 用户 / 用户组选择器（通用组件） ---- */
.member-selector {
  position: relative;
  min-width: 0;
}

div.member-selector-trigger {
  width: 100%;
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  padding: 5px 7px 5px 8px;
  border: 1px solid #b8c2d1;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.member-selector-trigger:hover,
.member-selector-trigger.is-open {
  border-color: var(--brand);
}

.member-selector-trigger.is-open {
  box-shadow: 0 0 0 3px rgba(49, 91, 215, 0.14);
}

.member-selector-trigger-values {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  white-space: nowrap;
}

.member-selector-placeholder {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
}

.member-selector-trigger-chip,
.member-selector-trigger-more {
  height: 24px;
  min-width: 0;
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  overflow: hidden;
  padding: 1px 5px 1px 7px;
  border: 1px solid #bfd0f8;
  border-radius: 4px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 12px;
  line-height: 18px;
}

.member-selector-trigger-chip {
  max-width: 150px;
}

.member-selector-trigger-chip > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-selector-trigger-more {
  flex: none;
  padding-right: 7px;
}

.member-selector-trigger-remove,
.member-selector-selected-remove,
.member-selector-toggle {
  display: inline-grid;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  place-items: center;
  cursor: pointer;
}

.member-selector-trigger-remove {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.member-selector-trigger-remove:hover,
.member-selector-selected-remove:hover,
.member-selector-toggle:hover {
  color: var(--brand);
}

.member-selector-trigger-remove .icon {
  width: 12px;
  height: 12px;
}

.member-selector-toggle {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.member-selector-toggle .disclosure-chevron {
  width: 15px;
  height: 15px;
  transform: rotate(90deg);
}

.member-selector-popover {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  width: min(640px, 100%);
  height: min(440px, var(--member-selector-popover-max-height, 440px));
  max-height: var(--member-selector-popover-max-height, 440px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.member-selector-popover.opens-upward {
  top: auto;
  bottom: calc(100% + 4px);
}

.member-selector-content {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
}

.member-selector-browse,
.member-selector-selected {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.member-selector-browse {
  border-right: 1px solid var(--line);
}

.ui-tabs-compact {
  min-height: 44px;
  flex: none;
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.ui-tabs-compact button {
  min-width: 88px;
  padding: 0 18px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
  font-weight: 600;
  cursor: pointer;
}

.ui-tabs-compact button:hover {
  color: var(--brand);
  background: #f8faff;
}

.ui-tabs-compact button.active {
  border-bottom-color: var(--brand);
  color: var(--brand);
}

.member-selector-search {
  min-height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-bottom: 1px solid var(--line);
}

.member-selector-search > .icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  color: var(--muted);
}

.member-selector-search-input {
  min-width: 0;
  min-height: 32px;
  flex: 1 1 auto;
  padding: 4px 0;
  border: 0;
  outline: 0;
}

.member-selector-search:focus-within {
  box-shadow: inset 0 0 0 1px rgba(49, 91, 215, 0.24);
}

.member-selector-breadcrumb {
  min-height: 38px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  padding: 5px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.member-selector-breadcrumb-link {
  min-width: 0;
  overflow: hidden;
  padding: 2px 4px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  text-overflow: ellipsis;
  cursor: pointer;
}

.member-selector-breadcrumb-link:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.member-selector-breadcrumb-current {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 600;
  text-overflow: ellipsis;
}

.member-selector-breadcrumb-separator {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: var(--line-strong);
}

.member-selector-candidates,
.member-selector-selected-list {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.member-selector-option,
.member-selector-group-choice {
  min-width: 0;
  display: grid;
  grid-template-columns: 16px 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 6px 14px;
  cursor: pointer;
}

.member-selector-option {
  border-bottom: 1px solid var(--line);
}

.member-selector-option:hover,
.member-selector-group-option:hover {
  background: #f8faff;
}

.member-selector-option input,
.member-selector-group-choice input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
}

.member-selector-group-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.member-selector-group-choice {
  border: 0;
}

.btn.link.member-selector-children {
  align-self: stretch;
  padding: 0 18px 0 12px;
  border-radius: 0;
}

.member-selector-avatar {
  width: 28px;
  height: 28px;
  display: inline-grid;
  border-radius: 50%;
  color: #2450b8;
  background: #dce8ff;
  font-size: 12px;
  font-weight: 650;
  place-items: center;
}

.member-selector-avatar.is-user-group {
  color: var(--success);
  background: var(--success-soft);
}

.member-selector-member-copy {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  overflow: hidden;
}

.member-selector-member-copy > strong,
.member-selector-member-copy > .caption {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-selector-member-copy > strong {
  flex: 0 1 auto;
}

.member-selector-member-copy > .caption {
  flex: 1 1 auto;
}

.member-selector-selected {
  background: #fbfcfe;
}

.member-selector-selected-head {
  min-height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.member-selector-selected-list {
  padding: 12px 14px;
}

.member-selector-selected-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}

.member-selector-selected-remove {
  width: 24px;
  height: 24px;
}

.member-selector-selected-remove .icon {
  width: 14px;
  height: 14px;
}

.member-selector-candidates > .status-state,
.member-selector-candidates > div > .status-state,
.member-selector-selected-list > .status-state {
  margin: 12px;
}

.member-selector-actions {
  min-height: 56px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

@media (max-width: 760px) {
  .member-selector-popover {
    width: 100%;
  }

  .member-selector-content {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(0, 125px);
  }

  .member-selector-browse {
    border-right: 0;
  }

  .member-selector-selected {
    border-top: 1px solid var(--line);
  }

  .member-selector-selected-head {
    min-height: 36px;
  }

  .member-selector-selected-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .member-selector-selected-item {
    min-width: 220px;
    margin-bottom: 0;
  }
}

/* ---- Cascader 级联树选择器（通用组件） ---- */
.cascader {
  position: relative;
  min-width: 0;
}

.cascader-trigger {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  color: var(--text);
  background: var(--surface);
}

.cascader-trigger-label {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cascader-trigger::after {
  content: "▾";
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.cascader-popover {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  width: 360px;
  max-width: min(360px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cascader-popover-constrained {
  display: flex;
  max-height: var(--cascader-popover-max-height);
  flex-direction: column;
}

.cascader-popover-constrained.opens-upward {
  top: auto;
  bottom: calc(100% + 4px);
}

.cascader-popover-constrained .cascader-head {
  flex: none;
}

.cascader-popover-constrained .cascader-list {
  min-height: 0;
  flex: 1 1 auto;
  max-height: none;
}

.cascader-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--line);
}

.cascader-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  min-height: 24px;
}

.cascader-crumb {
  padding: 1px 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  border-radius: 4px;
}

.cascader-crumb:hover:not(.current) {
  background: var(--brand-soft);
  color: var(--brand);
}

.cascader-crumb.current {
  color: var(--ink);
  font-weight: 600;
}

.cascader-crumb-sep {
  color: var(--line-strong);
  font-size: 12px;
}

.cascader-back {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-right: 2px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.cascader-back:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.cascader-search {
  width: 100%;
}

.cascader-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 4px;
  overscroll-behavior: contain;
}

.cascader-node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 6px;
}

.cascader-node:hover {
  background: var(--brand-soft);
}

.cascader-node.row-auth-permission-table-selected {
  background: var(--brand-soft);
  color: var(--brand);
}

.cascader-node-inline-expandable {
  font-weight: 600;
}

.cascader-node-children .cascader-node {
  padding-left: 30px;
}

.cascader-node-children .cascader-status {
  padding-left: 30px;
  text-align: left;
}

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

.cascader-node-arrow {
  flex: 0 0 auto;
  color: var(--muted);
}

.cascader-status {
  padding: 14px 10px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.llm-config-grid > .llm-wide-field { grid-column: 1 / -1; }
.llm-config-grid > .llm-pg-field { grid-column: span 3; }
.llm-config-grid > [hidden] { display: none; }
@media (max-width: 640px) {
  .llm-config-grid > .llm-pg-field { grid-column: 1 / -1; }
}

.asset-attribute-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.asset-attribute-head > .asset-detail-card-title {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
}

.asset-attribute-tabs {
  display: inline-flex;
  flex: 0 1 auto;
  width: max-content;
  max-width: 100%;
  margin-left: auto;
  overflow-x: auto;
  font-size: 13px;
}

.asset-attribute-tabs > button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.asset-calculation-caliber {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--page);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 400;
}

.asset-scope-modal.asset-scope-categories-only {
  width: min(560px, calc(100vw - 32px));
  height: min(600px, calc(100vh - 32px));
}

.asset-scope-categories-only .theme-picker-grid {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.asset-scope-modal .theme-picker-category-choice[role="treeitem"] {
  grid-template-columns: 24px 18px minmax(0, 1fr);
}

.asset-scope-modal .theme-picker-categories > button {
  padding: 8px;
}

.asset-scope-modal .theme-picker-category-pane > .search-input {
  flex: none;
  width: auto;
  margin: 10px 14px;
}

.asset-scope-modal .theme-picker-choice-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-scope-state-view {
  display: flex;
}

.asset-scope-pagination {
  justify-content: center;
  min-height: 52px;
  padding: 8px 14px;
}

.asset-scope-inline-state {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  min-height: 0;
  padding: 0;
}

@media (max-width: 760px) {
  .asset-scope-modal:not(.asset-scope-categories-only) .theme-picker-grid {
    grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1.2fr);
    grid-template-rows: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .asset-scope-modal:not(.asset-scope-categories-only) .theme-picker-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 0.95fr) minmax(0, 1.05fr);
  }
}
