@charset "UTF-8";
:root {
  --theme: #188979;
  --theme-hover: #126b5d;
  --theme-soft: #e6f3ec;
  --theme-page: #f0f6f5;
  --theme-focus: #50aa977f;
  --ink: #1e293b;
  --deep: #1d4ed8;
  --deep2: #1e40af;
  --paper: #f8fafc;
  --white: #ffffff;
  --line: #cbd5e1;
  --muted: #64748b;
  --soft: #f1f5f9;
  --neutral: #475569;
  --neutral-bg: #f1f5f9;
  --info: #1d4ed8;
  --info-bg: #eff6ff;
  --amber: #b45309;
  --amber-bg: #fffbeb;
  --red: #b91c1c;
  --red-bg: #fef2f2;
  --green: #166534;
  --green-bg: #f0fdf4;
  --shadow: 0 20px 70px #1e293b1f;
  --radius: 10px;
  font-family:
    "Segoe UI Variable Text", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--deep);
}
a {
  color: var(--deep);
  text-underline-offset: 3px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 1;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-family: "Segoe UI Variable Display", "Microsoft YaHei UI", sans-serif;
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.8px;
  line-height: 1.3;
}
h2 {
  font-size: 17px;
  letter-spacing: -0.2px;
}
h3 {
  font-size: 15px;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 12px;
}
svg {
  width: 19px;
  height: 19px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skip-link {
  position: fixed;
  top: -60px;
  left: 15px;
  z-index: 20;
  background: #fff;
  padding: 10px;
}
.skip-link:focus {
  top: 10px;
}
.initial-loading {
  display: grid;
  min-height: 100vh;
  place-content: center;
  text-align: center;
  gap: 20px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-family: Georgia, serif;
  font-size: 25px;
  line-height: 1;
  color: inherit;
  position: relative;
}
.brand-mark:after {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--theme);
  position: absolute;
  right: 4px;
  bottom: 4px;
  border-radius: 1px;
}
.initial-loading .brand-mark {
  margin: auto;
}
.shell {
  display: grid;
  grid-template-columns: 226px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--white);
  color: var(--ink);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 29px 18px 20px;
  overflow-y: auto;
}
.sidebar-close {
  display: none;
  position: absolute;
  top: 5px;
  right: 8px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 24px;
  width: 30px;
  height: 30px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 35px;
  color: var(--theme);
}
.brand b {
  font-size: 17px;
  font-weight: 580;
  letter-spacing: 0.2px;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 2.5px;
  color: var(--muted);
  line-height: 1.8;
}
.nav-caption {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: var(--muted);
  padding: 0 14px 10px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  padding: 12px 15px;
  border-radius: 7px;
  text-decoration: none;
  border: 1px solid transparent;
  position: relative;
}
.nav a:hover {
  background: var(--soft);
  color: var(--ink);
}
.nav a.active {
  background: var(--theme-soft);
  color: var(--theme);
  border-color: var(--theme);
}
.nav a.active:after {
  content: "";
  position: absolute;
  right: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--theme);
}
.nav .nav-end {
  margin-top: 25px;
  border-top: 1px solid var(--line);
  padding-top: 23px;
}
.sidebar-foot {
  margin-top: auto;
  padding: 18px 13px 0;
}
.sidebar-note {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 17px;
  margin-bottom: 17px;
}
.avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--info-bg);
  color: var(--deep);
  border-radius: 50%;
  font-size: 11px;
}
.user-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.user-row .who {
  flex: 1;
  min-width: 0;
}
.who b {
  font-size: 12px;
  font-weight: 500;
  overflow: hidden;
  display: block;
  text-overflow: ellipsis;
}
.who small {
  font-size: 10px;
  color: var(--muted);
}
.user-name {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  max-width: 115px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-name:hover {
  text-decoration: underline;
}
.logout {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px;
  display: grid;
  place-content: center;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 70px;
  border-bottom: 1px solid var(--line);
  padding: 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--white);
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
}
.breadcrumb strong {
  color: var(--ink);
  font-weight: 500;
}
.top-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 11px;
  color: var(--muted);
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  margin-right: 6px;
}
.top-meta .status-dot {
  box-shadow: 0 0 0 4px #1665341a;
}
.mobile-menu {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
}
main {
  max-width: 1620px;
  padding: 35px 38px 45px;
  margin: 0 auto;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 27px;
}
.eyebrow {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 2.2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.page-head p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 9px;
}
.head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 6px;
  min-height: 37px;
  padding: 8px 14px;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.btn:hover {
  background: var(--soft);
  border-color: #94a3b8;
}
.btn.primary {
  background: var(--deep);
  color: #fff;
  border-color: var(--deep);
}
.btn.primary:hover {
  background: var(--deep2);
}
.btn.danger {
  color: var(--red);
  border-color: var(--red);
  background: #fff;
}
.btn.small {
  min-height: 28px;
  padding: 4px 9px;
  font-size: 11px;
}
.btn.text {
  background: transparent;
  border-color: transparent;
  padding-left: 0;
  padding-right: 0;
}
.btn svg {
  width: 15px;
  height: 15px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 24px;
}
.metric {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  text-decoration: none;
  display: block;
  min-width: 0;
}
.metric .label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.metric .label svg {
  color: var(--muted);
  width: 17px;
  height: 17px;
}
.metric .number {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 13px 0 9px;
  font-family: "Bahnschrift", "DIN Alternate", sans-serif;
  font-size: 35px;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -1px;
}
.metric .number small {
  font:
    400 12px "Microsoft YaHei UI",
    sans-serif;
  letter-spacing: 0;
}
.metric .meta {
  font-size: 11px;
  color: var(--muted);
}
.metric.emphasis {
  background: var(--deep);
  border-color: var(--deep);
  color: white;
}
.metric.emphasis .label,
.metric.emphasis .meta,
.metric.emphasis .number small {
  color: #dbeafe;
}
.metric.emphasis .label svg {
  color: #bfdbfe;
}
.metric:hover {
  border-color: #94a3b8;
}
.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(290px, 1fr);
  gap: 20px;
}
.grid-two > * {
  min-width: 0;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.panel-head {
  padding: 19px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  font-size: 14px;
}
.panel-body {
  padding: 22px;
}
.panel-head p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.panel-foot {
  border-top: 1px solid var(--line);
  padding: 12px 22px;
  font-size: 11px;
  color: var(--muted);
}
.empty {
  padding: 45px 20px;
  text-align: center;
}
.empty .empty-icon {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  color: var(--muted);
}
.empty h3 {
  font-size: 14px;
  font-weight: 550;
}
.empty p {
  font-size: 12px;
  color: var(--muted);
  max-width: 400px;
  margin: 7px auto 0;
}
.empty .btn {
  margin-top: 18px;
}
.loading {
  padding: 55px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.spinner {
  width: 17px;
  height: 17px;
  display: inline-block;
  border: 2px solid var(--line);
  border-top-color: var(--deep);
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 10px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.notice {
  display: flex;
  gap: 10px;
  padding: 13px 16px;
  margin-bottom: 20px;
  font-size: 12px;
  background: var(--info-bg);
  border: 1px solid var(--info);
  color: var(--deep);
  border-radius: 7px;
  align-items: flex-start;
}
.notice svg {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}
.notice.warn {
  background: var(--amber-bg);
  border-color: var(--amber);
  color: var(--amber);
}
.notice.error {
  background: var(--red-bg);
  border-color: var(--red);
  color: var(--red);
}
.notice p + p {
  margin-top: 4px;
}
.inline-error {
  color: var(--red);
  background: var(--red-bg);
  font-size: 12px;
  padding: 12px;
  border-radius: 6px;
  margin: 15px 0;
  overflow-wrap: anywhere;
}
.inline-error:empty {
  display: none;
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  text-align: left;
  font-size: 12px;
}
th {
  font-size: 10px;
  font-weight: 550;
  letter-spacing: 0.2px;
  color: var(--muted);
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  padding: 12px 18px;
}
td {
  padding: 15px 18px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: var(--paper);
}
td small {
  display: block;
  font-size: 10px;
  margin-top: 3px;
  max-width: 270px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell-name {
  font-weight: 600;
  color: var(--ink);
}
button.cell-name {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
button.cell-name:hover {
  text-decoration: underline;
}
.mono {
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--neutral-bg);
  color: var(--neutral);
  white-space: nowrap;
}
.badge:before {
  content: "";
  height: 4px;
  width: 4px;
  border-radius: 50%;
  background: currentColor;
}
.badge.good {
  background: var(--green-bg);
  color: var(--green);
}
.badge.info {
  background: var(--info-bg);
  color: var(--info);
}
.badge.warn {
  background: var(--amber-bg);
  color: var(--amber);
}
.badge.bad {
  background: var(--red-bg);
  color: var(--red);
}
.filters {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 17px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.filters .field {
  margin: 0;
  min-width: 140px;
}
.filters .field.search {
  flex: 1;
  min-width: 200px;
}
.filters label {
  font-size: 10px;
}
.filters input,
.filters select {
  min-height: 35px;
  padding: 7px 10px;
  font-size: 12px;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.pagination div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.selection-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  background: var(--info-bg);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}
.selection-bar span {
  flex: 1;
}
.selection-bar[hidden] {
  display: none;
}
input[type="checkbox"] {
  accent-color: var(--deep);
  width: 15px;
  height: 15px;
  min-height: 0;
  margin: 0;
  vertical-align: middle;
}
input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--deep);
}
.check-label {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}
.field {
  display: block;
  margin: 0 0 17px;
}
.field > label,
.field > span {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 6px;
}
.field label small {
  font-weight: 400;
}
.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  min-height: 39px;
  padding: 9px 11px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.6;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid #1d4ed840;
  border-color: var(--deep);
}
.field textarea {
  resize: vertical;
  min-height: 90px;
}
.field .hint {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 5px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.form-grid > .wide {
  grid-column: 1/-1;
}
.form-section {
  padding-top: 18px;
  margin-top: 5px;
  border-top: 1px solid var(--line);
}
.form-section h3 {
  margin-bottom: 16px;
  font-size: 13px;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.required {
  color: var(--red);
}
.tabs {
  display: flex;
  gap: 23px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.tab {
  background: none;
  border: 0;
  padding: 0 0 11px;
  color: var(--muted);
  font-size: 12px;
  position: relative;
}
.tab.active {
  color: var(--theme);
  font-weight: 600;
}
.tab.active:after {
  position: absolute;
  content: "";
  bottom: -1px;
  height: 2px;
  left: 0;
  right: 0;
  background: var(--theme);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  color: var(--ink);
  background: var(--white);
  width: min(790px, calc(100vw - 32px));
  max-height: 90vh;
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: #122d2566;
  backdrop-filter: blur(3px);
}
.dialog-head {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 20px 25px;
  z-index: 2;
}
.dialog-head h2 {
  font-size: 18px;
}
.dialog-head small {
  display: block;
  margin-top: 3px;
}
.dialog-close {
  background: var(--soft);
  border: 0;
  border-radius: 50%;
  width: 29px;
  height: 29px;
  font-size: 21px;
  line-height: 1;
  color: var(--muted);
}
.dialog-body {
  padding: 24px 25px;
}
.dialog-foot {
  padding: 16px 25px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  position: sticky;
  bottom: 0;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px 22px;
  margin-bottom: 20px;
}
.detail-grid > div {
  min-width: 0;
}
.detail-grid dt {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 5px;
}
.detail-grid dd {
  margin: 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.detail-title {
  font-size: 12px;
  font-weight: 600;
  padding-top: 18px;
  margin: 18px 0 13px;
  border-top: 1px solid var(--line);
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 15px;
  border-radius: 6px;
  font:
    11px/1.75 "Cascadia Code",
    "Consolas",
    monospace;
  margin: 0;
}
.diff-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 260px;
}
.diff-before {
  color: var(--muted);
}
.diff-after {
  background: var(--green-bg);
  color: var(--green);
}
.task-list {
  display: flex;
  flex-direction: column;
}
.task-item {
  padding: 17px 22px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.task-item:last-child {
  border: 0;
}
.task-item .task-text {
  flex: 1;
}
.task-text strong {
  display: block;
  font-size: 12px;
  font-weight: 550;
}
.task-text small {
  font-size: 10px;
  margin-top: 3px;
  display: block;
}
.task-icon {
  background: var(--green-bg);
  padding: 8px;
  border-radius: 7px;
  color: var(--green);
  display: grid;
}
.task-icon.warn {
  color: var(--amber);
  background: var(--amber-bg);
}
.count-pill {
  font-family: "Bahnschrift", sans-serif;
  font-size: 14px;
  min-width: 30px;
  text-align: center;
  background: var(--soft);
  border-radius: 5px;
  padding: 3px 8px;
}
.usage-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  gap: 15px;
}
.usage-row:last-child {
  border: 0;
  padding-bottom: 0;
}
.usage-row:first-child {
  padding-top: 0;
}
.usage-row span {
  font-size: 12px;
}
.usage-row small {
  display: block;
  font-size: 10px;
  margin-top: 3px;
}
.usage-row strong {
  font:
    500 23px "Bahnschrift",
    sans-serif;
  white-space: nowrap;
}
.rule {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 16px;
  margin-bottom: 14px;
  background: #fff;
}
.rule-head {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 12px;
}
.rule-head h3 {
  font-size: 12px;
}
.rule .field {
  margin-bottom: 12px;
}
.rule-group {
  background: var(--soft);
  border-left: 3px solid var(--line);
  padding: 12px;
  margin: 12px 0;
}
.rule-group-label {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}
.condition {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr 25px;
  gap: 7px;
  align-items: start;
  margin-bottom: 8px;
}
.condition select,
.condition textarea {
  font-size: 11px;
  min-height: 32px;
  padding: 5px 7px;
}
.condition .field {
  margin: 0;
}
.condition .case-field {
  grid-column: 1/-1;
  font-size: 10px;
  color: var(--muted);
}
.condition textarea {
  height: 33px;
  min-height: 33px;
}
.rule-actions {
  display: flex;
  gap: 15px;
}
.protocols {
  display: flex;
  gap: 15px;
  font-size: 11px;
  margin: 8px 0;
  flex-wrap: wrap;
}
.rule .check-label {
  font-size: 11px;
}
.risk-outcome {
  padding: 15px;
  background: var(--soft);
  border-radius: 7px;
}
.risk-outcome h3 {
  margin-bottom: 8px;
  font-size: 13px;
}
.iq-progress {
  height: 6px;
  border-radius: 5px;
  background: var(--soft);
  overflow: hidden;
  margin: 15px 0 8px;
}
.iq-progress span {
  display: block;
  height: 100%;
  background: var(--green);
  transition: width 0.3s;
}
.result-answer {
  white-space: pre-wrap;
  max-height: 220px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.8;
  background: var(--paper);
  border-radius: 5px;
  padding: 12px;
  overflow-wrap: anywhere;
}
.stat-strip {
  display: flex;
  gap: 23px;
  flex-wrap: wrap;
}
.stat-strip > div {
  display: flex;
  flex-direction: column;
}
.stat-strip strong {
  font:
    500 25px "Bahnschrift",
    sans-serif;
}
.stat-strip small {
  font-size: 10px;
}
.text-right {
  text-align: right;
}
.stack {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.secret {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.secret input {
  flex: 1;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  font:
    12px "Consolas",
    monospace;
  border-radius: 5px;
}
.section-note {
  margin: 14px 0;
  font-size: 11px;
  color: var(--muted);
}
.nowrap {
  white-space: nowrap;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.not-found {
  padding: 50px 0;
  text-align: center;
}
#toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  max-width: min(480px, calc(100vw - 40px));
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid currentColor;
  box-shadow: var(--shadow);
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 12px;
  z-index: 50;
  opacity: 0;
  transform: translateY(15px);
  transition: 0.2s;
  pointer-events: none;
}
#toast.visible {
  opacity: 1;
  transform: none;
}
#toast.error { color: var(--red); background: var(--red-bg); }
#toast.info { color: var(--info); background: var(--info-bg); }
#toast.warn { color: var(--amber); background: var(--amber-bg); }
#toast.neutral { color: var(--neutral); background: var(--neutral-bg); }
.notice.good { color: var(--green); background: var(--green-bg); border-color: var(--green); }
.notice.neutral { color: var(--neutral); background: var(--neutral-bg); border-color: var(--neutral); }
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.login-art {
  background: var(--theme);
  color: white;
  padding: 45px 55px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.login-art:before {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  border: 1px solid #bbd5ad1a;
  border-radius: 50%;
  left: -75px;
  bottom: -125px;
  box-shadow:
    0 0 0 75px #bbd5ad08,
    0 0 0 150px #bbd5ad05;
}
.login-art .brand {
  padding: 0;
  color: var(--white);
}
.login-statement {
  margin: auto 0;
  position: relative;
  padding: 60px 0;
}
.login-statement .eyebrow {
  color: var(--white);
  margin-bottom: 24px;
  letter-spacing: 3px;
}
.login-statement h1 {
  font-size: 44px;
  line-height: 1.45;
  letter-spacing: 1px;
  font-weight: 450;
}
.login-statement p {
  font-size: 13px;
  line-height: 2.1;
  color: var(--white);
  margin-top: 22px;
  max-width: 340px;
}
.login-art footer {
  color: var(--white);
  font-size: 10px;
  letter-spacing: 1px;
}
.login-form-wrap {
  background: var(--theme-page);
  display: grid;
  place-items: center;
  padding: 35px;
}
.login-form {
  width: min(355px, 100%);
}
.login-form .eyebrow {
  margin-bottom: 12px;
}
.login-form h2 {
  font-size: 25px;
  font-weight: 580;
  margin-bottom: 12px;
}
.login-form > p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 33px;
}
.login-form .field {
  margin-bottom: 20px;
}
.login-form input {
  min-height: 46px;
  background: #fff;
}
.login-form .btn {
  width: 100%;
  min-height: 45px;
  margin-top: 6px;
}
.login-form footer {
  font-size: 10px;
  color: var(--muted);
  margin-top: 27px;
  line-height: 1.9;
}
.login-form .password-wrap {
  position: relative;
}
.login-form .password-wrap input {
  padding-right: 50px;
}
.password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 43px;
  height: 46px;
  border: 0;
  background: none;
  color: var(--muted);
  display: grid;
  place-items: center;
}
.page-enter {
  animation: enter 0.3s ease-out;
}
@keyframes enter {
  from {
    opacity: 0.2;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (min-width: 1700px) {
  main {
    padding-top: 42px;
  }
  .metrics {
    gap: 22px;
  }
  .metric {
    padding: 25px 26px;
  }
  .grid-two {
    gap: 24px;
  }
  .page-head {
    margin-bottom: 34px;
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 195px minmax(0, 1fr);
  }
  .sidebar {
    padding-left: 10px;
    padding-right: 10px;
  }
  .brand {
    gap: 9px;
    padding-left: 7px;
  }
  .brand b {
    font-size: 15px;
  }
  .brand small {
    letter-spacing: 1.5px;
  }
  main {
    padding: 27px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 16px;
  }
  .metric .number {
    font-size: 30px;
  }
  .grid-two {
    grid-template-columns: 1fr;
  }
  .top-meta .date {
    display: none;
  }
}
@media (max-width: 760px) {
  .sidebar-close {
    display: block;
  }
  .shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    left: -235px;
    width: 226px;
    z-index: 10;
    transition: left 0.2s;
    box-shadow: 10px 0 30px #142d2533;
  }
  .sidebar.open {
    left: 0;
  }
  .mobile-menu {
    display: grid;
    place-content: center;
    margin-left: -5px;
    padding: 6px;
  }
  .topbar {
    height: 59px;
    padding: 0 18px;
  }
  .breadcrumb {
    gap: 8px;
  }
  .top-meta {
    gap: 0;
  }
  .top-meta .environment {
    font-size: 10px;
  }
  main {
    padding: 25px 17px;
  }
  h1 {
    font-size: 26px;
  }
  .page-head {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 17px;
    margin-bottom: 23px;
  }
  .head-actions {
    width: 100%;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 19px;
  }
  .metric {
    padding: 15px;
  }
  .metric .number {
    font-size: 29px;
  }
  .metric .meta {
    font-size: 10px;
  }
  .metric .label {
    font-size: 11px;
  }
  .metric .label svg {
    display: none;
  }
  .panel-head,
  .filters {
    padding: 16px;
  }
  .panel-body {
    padding: 17px;
  }
  .filters .field {
    flex: 1;
    min-width: 120px;
  }
  .filters .field.search {
    min-width: 100%;
  }
  .grid-two {
    gap: 0;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid > .wide {
    grid-column: auto;
  }
  .dialog-head {
    padding: 17px;
  }
  .dialog-body {
    padding: 18px;
  }
  .dialog-foot {
    padding: 13px 17px;
  }
  .detail-grid {
    gap: 17px 13px;
  }
  .condition {
    grid-template-columns: 1fr 1fr 25px;
  }
  .condition .value-field {
    grid-column: 1/3;
    grid-row: 2;
  }
  .condition .remove-condition {
    grid-column: 3;
    grid-row: 1;
  }
  .condition .case-field {
    grid-row: 3;
  }
  .rule {
    padding: 12px;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-art {
    padding: 25px;
    min-height: 220px;
  }
  .login-statement {
    padding: 30px 0 5px;
    margin: 0;
  }
  .login-statement .eyebrow,
  .login-statement p,
  .login-art footer {
    display: none;
  }
  .login-statement h1 {
    font-size: 26px;
    line-height: 1.5;
  }
  .login-art:before {
    width: 300px;
    height: 300px;
    left: auto;
    right: -60px;
    bottom: -180px;
  }
  .login-form-wrap {
    padding: 35px 25px 50px;
  }
  .login-form h2 {
    font-size: 23px;
  }
  .tabs {
    gap: 19px;
  }
  .stat-strip {
    gap: 17px;
  }
  .selection-bar {
    flex-wrap: wrap;
    padding: 12px 16px;
  }
  .selection-bar span {
    flex-basis: 100%;
  }
  .usage-row strong {
    font-size: 20px;
  }
  .task-item {
    padding: 15px 17px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Model configuration keeps editing, target binding and publication distinct. */
.model-workflow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}
.model-workflow > div { padding: 18px 22px; border-right: 1px solid var(--line); }
.model-workflow > div:last-child { border-right: 0; }
.model-workflow b { display: block; font-size: 12px; font-weight: 600; }
.model-workflow span { color: var(--amber); font: 18px "Bahnschrift", sans-serif; margin-right: 10px; }
.model-workflow p { color: var(--muted); font-size: 11px; margin-top: 5px; }
.model-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.model-config-card { padding: 21px 22px; margin: 0; border-top: 3px solid var(--green); }
.model-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.model-card-heading h2 { overflow-wrap: anywhere; font-size: 16px; }
.model-config-card .detail-grid { margin: 18px 0; }
.model-config-card .head-actions { border-top: 1px solid var(--line); padding-top: 15px; gap: 7px; }
.model-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 10px; }
.model-tag { border: 1px solid var(--line); color: var(--muted); border-radius: 4px; padding: 1px 6px; font-size: 10px; overflow-wrap: anywhere; }
.model-row { margin: 0 0 15px; border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 16px; min-width: 0; }
.model-row legend { padding: 0 6px; font-size: 11px; font-weight: 600; color: var(--green); }
.model-row-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.model-row-head .field { flex: 1; }
.model-protocols { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.model-protocols label { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.model-ratios { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.model-ratios .field { margin-bottom: 0; }
.model-ratios label { font-size: 11px; }
.model-ratios input { font-family: "Bahnschrift", "Consolas", monospace; font-size: 15px; }
.model-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin: 18px 0 12px; }
.model-toolbar p { font-size: 11px; color: var(--muted); }
.model-price-note { font-size: 11px; line-height: 1.8; color: var(--muted); margin: 12px 0 18px; }
.model-price-section { min-width: 0; margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper, #fff); }
.model-price-section[hidden] { display: none; }
.model-price-section legend { color: var(--green); font-size: 12px; font-weight: 600; padding: 0 5px; }
.model-price-section .model-price-note { margin: 0 0 12px; }
.model-long-toggle { display: flex; gap: 8px; align-items: center; margin: 16px 0 4px; font-size: 12px; }
.model-long-toggle input { width: auto; }
.model-check { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.model-check span { display: block; font-size: 12px; }
.model-check small { display: block; font-size: 10px; }
.model-check:last-child { border-bottom: 0; }
.model-preview-site { margin-top: 20px; border-top: 3px solid var(--green); }
.model-preview-site .notice { margin: 15px; }
.model-preview-site .detail-grid { padding: 15px 18px 0; }
.model-preview-site details, .model-execution details { padding: 13px 18px; border-top: 1px solid var(--line); }
.model-preview-site summary, .model-execution summary { cursor: pointer; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.model-preview-site details .table-scroll, .model-execution details .table-scroll { margin: 12px -18px -13px; }
.model-publication-progress { display: flex; gap: 7px; flex-wrap: wrap; margin: 13px 0; }
.model-publication-progress > span { border: 1px solid var(--line); padding: 6px 10px; border-radius: 4px; font-size: 11px; }
.model-locked { background: var(--soft); padding: 14px; margin: 18px 0; border: 1px solid var(--line); border-radius: 7px; }
.model-locked textarea, .model-locked input[readonly] { background: var(--neutral-bg); color: var(--neutral); }
.model-locked .field:last-child { margin-bottom: 0; }
.model-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.model-diff { white-space: normal; overflow-wrap: anywhere; min-width: 140px; }
.model-diff ins { color: var(--green); text-decoration: none; }
.model-diff del { color: var(--muted); text-decoration-color: var(--muted); }
@media (max-width: 1050px) { .model-card-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .model-workflow { grid-template-columns: 1fr; }
  .model-workflow > div { border-right: 0; border-bottom: 1px solid var(--line); padding: 13px 16px; }
  .model-workflow > div:last-child { border-bottom: 0; }
  .model-config-card { padding: 17px; }
  .model-ratios { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .model-row { padding: 12px; }
  .model-check { grid-template-columns: 18px minmax(0, 1fr); }
  .model-check > .badge { grid-column: 2; justify-self: start; }
  .model-card-heading { flex-wrap: wrap; }
}
/* Rule values retain readable lines on narrow screens; the existing table
   wrapper supplies local horizontal scrolling without widening the dialog. */
.policy-rule-diff table { min-width: 560px; }
.policy-rule-diff th:first-child, .policy-rule-diff td:first-child { width: 200px; }
.policy-module { border-left: 3px solid var(--line); padding-left: 20px; }
.policy-toggle { margin: 12px 0; font-weight: 600; }
.policy-toggle .badge { margin-left: auto; }
.policy-rule-summary { padding: 16px 20px; border-top: 1px solid var(--line); }
.policy-rule-summary h4 { margin: 0 0 8px; }
.policy-sample { margin-top: 20px; padding: 16px; background: var(--surface-soft, var(--soft)); border-radius: 10px; }
.policy-sample summary { cursor: pointer; font-weight: 600; }
@media (max-width: 760px) { .policy-module { padding-left: 12px; } .policy-rule-summary { padding: 12px; } }

/* Fingerprint results retain the console's compact, evidence-first layout. */
.fingerprint-action, .fingerprint-kind { color: var(--deep); background: var(--info-bg); border-color: var(--info); }
.fingerprint-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.fingerprint-methods > div { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 7px; background: var(--soft); }
.fingerprint-methods strong { display: block; font-size: 14px; margin: 8px 0; }
.fingerprint-methods p { font-size: 12px; color: var(--muted); line-height: 1.7; }
.fingerprint-results table { min-width: 730px; }
.fingerprint-results td:nth-child(2) { min-width: 215px; }
.fingerprint-results td:nth-child(3) { min-width: 135px; }
.fingerprint-ranking { padding-left: 18px; margin: 0 0 8px; }
.fingerprint-ranking li { margin: 0 0 8px; padding-left: 3px; }
.fingerprint-ranking li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
.fingerprint-ranking li:first-child > span { font-weight: 600; color: var(--deep); }
.fingerprint-ranking small { white-space: normal; }
.fingerprint-evidence { border: 1px solid var(--line); border-radius: 7px; padding: 18px; margin-top: 20px; background: var(--paper); }
.fingerprint-evidence h3 { font-size: 14px; overflow-wrap: anywhere; }
.fingerprint-probe { margin: 10px 0; }
.fingerprint-probe .detail-grid { margin-top: 14px; }
.fingerprint-probe summary { overflow-wrap: anywhere; }
.fingerprint-probe .result-answer { max-height: 250px; }
@media (max-width: 760px) {
  .fingerprint-methods { grid-template-columns: 1fr; }
  .fingerprint-evidence { padding: 12px; }
}

/* Disabled controls retain a fixed neutral surface, including hover/focus states. */
button:disabled, button:disabled:hover, button:disabled:focus,
.btn:disabled, .btn:disabled:hover, .btn:disabled:focus {
  color: var(--neutral); background: var(--neutral-bg); border-color: var(--line);
  opacity: 1; cursor: not-allowed; box-shadow: none;
}
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--red); }

/* Brand navigation is separate from action and result colors. */
.nav a:focus-visible, .tab:focus-visible { outline: 2px solid var(--theme-focus); }
.nav a:hover { background: var(--theme-soft); color: var(--theme-hover); }
.login-art .brand-mark:after { background: var(--theme-soft); }

.login-art .brand small { color: var(--white); }
.initial-loading .brand-mark { color: var(--theme); }
