:root {
  /* ===== 第六十一轮：晨雾蓝图（Morning Blueprint）浅色主题 =====
     设计依据：白底工程图纸的观感 —— 细青线、浅灰蓝分层、单色相强调。
     单一色相预算：深青为主色；绿色只表示成功，红色只表示危险，琥珀只表示警示。
     正文对比度按白底 #ffffff 计算：ink 17.6:1 / ink-2 7.3:1 / ink-3 5.1:1 / brand 5.8:1。 */
  --ground: #f4f7fb;
  --ground-2: #eaf0f6;
  --surface: #ffffff;
  --surface-2: #f7fafd;
  --surface-3: #edf3f8;
  --raised: #ffffff;
  --raised-2: #f7fafd;
  --active: #e5eef5;
  --border: #dae4ee;
  --border-strong: #bfd0e0;
  --rule: #e9eff6;
  --control: #cbd9e6;
  --control-strong: #adbfd0;
  --ink: #0f1a24;
  --ink-2: #46586c;
  --ink-3: #4e6174;
  --brand: #0d6f85;
  --brand-strong: #0a5c70;
  --brand-deep: #eaf4f8;
  --brand-soft: rgba(13, 111, 133, .08);
  --on-accent: #ffffff;
  --info: #2860c4;
  --positive: #12805c;
  --negative: #c0392b;
  --warning: #8a6512;
  --pill-positive-bg: rgba(18, 128, 92, .10);
  --pill-positive-ink: #0d6047;
  --pill-negative-bg: rgba(192, 57, 43, .09);
  --pill-negative-ink: #a12d21;
  --pill-warning-bg: rgba(138, 101, 18, .10);
  --pill-warning-ink: #6f510d;
  --tint-positive: rgba(18, 128, 92, .06);
  --tint-negative: rgba(192, 57, 43, .06);
  --tint-warning: rgba(138, 101, 18, .06);
  --tint-info: rgba(40, 96, 196, .06);
  --border-positive: rgba(18, 128, 92, .34);
  --border-negative: rgba(192, 57, 43, .30);
  --border-warning: rgba(138, 101, 18, .32);
  --border-info: rgba(40, 96, 196, .32);
  --code-bg: #f2f6fa;
  --code-ink: #1d3348;
  --chart-1: #0d6f85;
  --chart-2: #2860c4;
  --chart-3: #8a6512;
  --font-sans: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
  --radius-card: 10px;
  --radius-control: 8px;
  --radius-sheet: 18px;
  --sheet-inset: 8px;
  --sidebar-width: 228px;
  --topbar-h: 52px;
  --row-height: 48px;
  --gap: 24px;
  --pad: 24px;
  --control-height: 34px;
  --fs-title: 24px;
  --fs-section: 16px;
  --fs-kpi: 26px;
  --fs-body: 14px;
  --fs-small: 12px;
  /* 玻璃层：浅色主题的层级靠"白度差 + 1px 细线 + 极浅阴影"表达 */
  --glass-1: rgba(255, 255, 255, .82);
  --glass-2: rgba(255, 255, 255, .92);
  --glass-line: rgba(13, 111, 133, .14);
  --hairline: rgba(15, 26, 36, .055);
  --glow-brand: 0 0 0 1px rgba(13, 111, 133, .18), 0 6px 20px rgba(13, 111, 133, .08);
  --glow-focus: 0 0 0 3px rgba(13, 111, 133, .16);
  /* legacy aliases — 旧规则继续可用 */
  --accent: var(--brand);
  --accent-dark: var(--brand-strong);
  --accent-soft: var(--brand-soft);
  --teal: var(--positive);
  --teal-soft: var(--pill-positive-bg);
  --orange: var(--warning);
  --orange-soft: var(--pill-warning-bg);
  --red: var(--negative);
  --red-soft: var(--pill-negative-bg);
  --amber: var(--warning);
  --amber-soft: var(--pill-warning-bg);
  --green: var(--positive);
  --green-soft: var(--pill-positive-bg);
  --nav: var(--surface);
  --nav-2: var(--surface-2);
  --bg: var(--ground);
  --panel: var(--surface);
  --line: var(--border);
  --line-strong: var(--control);
  --text: var(--ink);
  --muted: var(--ink-2);
  --muted-2: var(--ink-3);
  --shadow-sm: 0 1px 2px rgba(15, 26, 36, .05);
  --shadow-md: 0 6px 18px rgba(15, 26, 36, .07);
  --shadow-lg: 0 18px 44px rgba(15, 26, 36, .10);
  --radius: var(--radius-card);
  --radius-sm: var(--radius-control);
  font-family: var(--font-sans);
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
}
body {
  background: var(--ground);
  background-size: 28px 28px;
}
button, input, select, textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-dark);
}
.hidden {
  display: none !important;
}
body.nav-open {
  overflow: hidden;
}
button, a, input, select, textarea {
  transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease, opacity .18s ease;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 0;
}
button:disabled {
  cursor: not-allowed;
  opacity: .56;
  transform: none !important;
}

@keyframes modalIn {
  from {
  opacity: 0;
  transform: translateY(14px) scale(.98);
}
  to {
  opacity: 1;
  transform: translateY(0) scale(1);
}
}
@keyframes toastIn {
  from {
  opacity: 0;
  transform: translateY(-8px);
}
  to {
  opacity: 1;
  transform: translateY(0);
}
}
.primary, .ghost {
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  max-width: 100%;
  white-space: nowrap;
  overflow-wrap: normal;
  text-align: center;
  line-height: 1;
}
.primary {
  color: var(--on-accent);
  background: var(--surface);
  border-color: var(--brand);
}
.primary:hover {
  background: var(--surface);
  transform: translateY(-1px);
}
.ghost {
  background: var(--surface);
  color: var(--ink-2);
  border-color: var(--line-strong);
}
.ghost:hover {
  background: var(--surface-2);
  border-color: var(--control);
  transform: translateY(-1px);
}
.small-btn {
  min-height: 30px;
  padding: 6px 12px;
  font-size: 13px;
}
.danger-text {
  color: var(--red);
  border-color: var(--border-negative);
}
.danger-text:hover {
  background: var(--red-soft);
  border-color: var(--border-negative);
  color: var(--negative);
}
.link-btn {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 2px 0;
  min-height: 28px;
  max-width: 100%;
  white-space: nowrap;
  overflow-wrap: normal;
  line-height: 1.35;
}
.link-btn:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}
.brand-mark {
  width: 33px;
  height: 33px;
  display: inline-block;
  transform: rotate(45deg);
  border: 7px solid var(--orange);
  border-left-color: var(--negative);
  border-bottom-color: var(--negative);
  border-radius: 4px;
}
.brand-mark.small {
  width: 24px;
  height: 24px;
  border-width: 5px;
  border-radius: 3px;
}
.agent-view {
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
}
.agent-hero {
  position: relative;
  min-height: 210px;
  padding: 24px clamp(16px, 4vw, 42px);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
  border-bottom: 1px solid rgba(203, 213, 225, .78);
  background: var(--surface);
}
.agent-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--surface);
  background-size: 34px 34px;
  opacity: .55;
  pointer-events: none;
}
.user-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  align-self: flex-start;
}
.user-brand strong {
  display: block;
  font-size: 24px;
  line-height: 1.2;
}
.user-brand span:not(.brand-mark) {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}
.user-admin-link {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  color: var(--brand-strong);
  padding: 9px 12px;
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: var(--radius-sm);
  background: rgba(15,26,36,0.050);
  white-space: nowrap;
}
.user-admin-link:hover {
  background: var(--surface);
  transform: translateY(-1px);
}
.agent-main {
  width: min(860px, calc(100vw - 28px));
  margin: -86px auto 0;
  padding-bottom: 36px;
  position: relative;
  z-index: 2;
}
.agent-panel, .agent-center {
  background: rgba(15,26,36,0.050);
  border: 1px solid rgba(223, 230, 239, .92);
  border-radius: var(--radius);
}
.agent-panel {
  padding: 22px;
}
.user-card-form, .agent-generate-form {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.user-card-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
}
.user-card-form label, .agent-generate-form label {
  display: grid;
  gap: 7px;
  color: var(--ink-2);
  font-weight: 700;
  min-width: 0;
}
.user-card-form input, .user-card-form select, .user-card-form textarea, .agent-generate-form input, .agent-generate-form select, .agent-generate-form textarea, .label input, .label select, .field input, .field select, .field textarea, .agent-transfer-row input {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  outline: none;
}
.user-card-form input, .user-card-form select, .agent-generate-form input, .agent-generate-form select {
  height: 44px;
  padding: 0 12px;
}
.user-card-form textarea {
  min-height: 96px;
  padding: 10px 12px;
  resize: vertical;
}
.agent-generate-form textarea {
  height: 96px;
  padding: 10px 12px;
  resize: vertical;
}
.user-card-form input:focus, .user-card-form select:focus, .user-card-form textarea:focus, .agent-generate-form input:focus, .agent-generate-form select:focus, .agent-generate-form textarea:focus, .label input:focus, .label select:focus, .field input:focus, .field select:focus, .field textarea:focus, .agent-transfer-row input:focus {
  border-color: var(--accent);
}
.user-inline-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  gap: 12px;
}
.user-captcha-row {
  align-items: end;
}
.user-captcha-row label {
  min-width: 0;
}
.captcha-box {
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  color: var(--ink-2);
  font: 700 13px/46px sans-serif;
}
.captcha-box:hover {
  border-color: var(--control);
  background: var(--surface);
  transform: translateY(-1px);
}
.captcha-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--surface);
}
.captcha-action {
  min-height: 44px;
  padding: 0 12px;
  white-space: nowrap;
}
.user-submit {
  height: 44px;
  width: 100%;
  margin-top: 4px;
}
.user-msg, .form-msg {
  min-height: 20px;
  margin: 0;
  color: var(--red);
  text-align: center;
}
.user-summary-grid div, .user-info-list div, .agent-action-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.user-summary-grid span, .user-info-list span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}
.agent-center {
  overflow: hidden;
}
.user-center-head {
  min-height: 66px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.user-center-head strong {
  display: block;
  font-size: 18px;
  overflow-wrap: anywhere;
}
.user-center-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
.user-tabs {
  display: flex;
  gap: 6px;
  padding: 10px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.user-tabs button {
  flex: 0 0 auto;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-2);
  padding: 0 12px;
}
.user-tabs button:hover {
  background: var(--surface-2);
}
.user-tabs button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.user-center-body {
  min-width: 0;
  padding: 16px;
}
.user-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.user-summary-grid div, .user-info-list div {
  padding: 12px;
}
.user-summary-grid strong {
  font-size: 24px;
}
.user-info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.agent-action-form {
  min-width: 0;
  margin-bottom: 14px;
  padding: 14px;
  overflow-wrap: anywhere;
}
.form-hint {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.55;
}
.form-hint.is-error {
  color: var(--red);
}
.security-question-group {
  display: grid;
  gap: 10px;
}
.login-form .security-question-group .form-hint {
  font-size: 13px;
  color: var(--ink-3);
}
.user-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  text-align: center;
}
.agent-balance-strip {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border-positive);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--pill-positive-bg);
  color: var(--positive);
}
.agent-balance-strip strong {
  font-size: 24px;
}
.agent-settlement-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.agent-settlement-guide div {
  min-height: 118px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 6px 10px;
  align-content: start;
}
.agent-settlement-guide span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-weight: 900;
}
.agent-settlement-guide strong {
  align-self: center;
  color: var(--text);
}
.agent-settlement-guide p {
  grid-column: 2;
  margin: 0;
  color: var(--ink-2);
  line-height: 1.55;
}
.agent-settlement-list {
  display: grid;
  gap: 12px;
}
.agent-settlement-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 14px;
}
.agent-settlement-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.agent-settlement-head strong {
  display: block;
  color: var(--text);
  overflow-wrap: anywhere;
}
.agent-settlement-head span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}
.agent-settlement-head em {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--raised-2);
  color: var(--ink-2);
  font-style: normal;
  font-weight: 900;
}
.agent-settlement-card p {
  margin: 8px 0 0;
  color: var(--ink-2);
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.settlement-upload {
  display: grid;
  gap: 8px;
}
.settlement-upload input[type="file"] {
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: var(--panel);
}
.settlement-upload small {
  color: var(--muted);
  line-height: 1.5;
}
.settlement-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.settlement-image-grid figure, .settlement-image-grid a {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
}
.settlement-image-grid figure {
  position: relative;
}
.settlement-image-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}
.settlement-image-grid figcaption {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.image-remove-button {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(15,26,36,0.050);
  color: var(--negative);
  font-size: 20px;
  line-height: 1;
}
.image-remove-button:hover {
  border-color: var(--border-negative);
  background: var(--tint-negative);
}
.image-remove-button:disabled {
  cursor: wait;
  opacity: 0.6;
}
.agent-settlement-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}
.agent-settlement-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0 2px;
}
.agent-settlement-timeline span {
  min-height: 30px;
  border-radius: 999px;
  background: var(--raised-2);
  color: var(--ink-2);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  padding: 0 8px;
}
.agent-settlement-timeline span.is-done {
  background: var(--green-soft);
  color: var(--green);
}
.agent-settlement-timeline span.is-current {
  background: var(--tint-info);
  color: var(--info);
}
.agent-settlement-timeline span.is-closed {
  background: var(--red-soft);
  color: var(--red);
}
.agent-cost-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--border-info);
  border-radius: var(--radius);
  background: var(--tint-info);
  padding: 12px;
}
.agent-cost-preview div {
  min-height: 54px;
  display: grid;
  gap: 4px;
  align-content: center;
  border-radius: var(--radius-sm);
  background: rgba(15,26,36,0.050);
  padding: 8px 10px;
  overflow-wrap: anywhere;
}
.agent-cost-preview span {
  color: var(--muted);
  font-size: 12px;
}
.agent-cost-preview strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.15;
}
.agent-cost-preview p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink-2);
  line-height: 1.5;
}
.agent-cost-preview.is-bad {
  border-color: var(--border-negative);
  background: var(--tint-negative);
}
.agent-cost-preview.is-bad strong, .agent-cost-preview.is-bad p {
  color: var(--negative);
}
.agent-generated-box {
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px;
  display: grid;
  gap: 10px;
}
.agent-generated-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
}
.agent-generated-box textarea {
  width: 100%;
  min-height: 170px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px;
  resize: vertical;
  background: var(--surface);
  font-family: Consolas, "Courier New", monospace;
}
.agent-generated-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.agent-table-wrap {
  margin-top: 0;
}
.agent-transfer-row {
  display: grid;
  grid-template-columns: minmax(86px, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
}
.agent-transfer-row input {
  min-width: 0;
  height: 34px;
  padding: 0 10px;
}
.agent-transfer-row .small-btn {
  min-height: 34px;
}
.entry-view, .login-view {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: var(--ground);
  display: grid;
  grid-template-rows: 1fr auto;
}
.login-bg {
  position: absolute;
  inset: 0;
  opacity: .85;
  pointer-events: none;
}
.login-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--surface);
  background-size: 38px 38px;
}
.node {
  position: absolute;
  width: 96px;
  height: 1px;
  background: rgba(37, 99, 235, .24);
  transform-origin: left center;
}
.node::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(15,159,143,.45);
  background: var(--surface);
}
.n1 {
  left: 8%;
  top: 20%;
  transform: rotate(32deg);
}
.n2 {
  left: 21%;
  top: 31%;
  transform: rotate(-18deg);
  background: rgba(249,115,22,.24);
}
.n3 {
  right: 20%;
  top: 16%;
  transform: rotate(128deg);
}
.n4 {
  right: 6%;
  bottom: 25%;
  transform: rotate(150deg);
  background: rgba(15,159,143,.26);
}
.entry-panel, .login-panel {
  position: relative;
  align-self: start;
  justify-self: center;
  margin-top: 32px;
  border: 1px solid rgba(34,48,65,.92);
  border-radius: var(--radius);
  background: rgba(15,26,36,0.050);
}
.entry-panel {
  width: min(860px, calc(100vw - 32px));
  padding: 30px;
}
.login-panel {
  width: min(430px, calc(100vw - 32px));
  padding: 30px;
}
.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 32px;
}
.login-brand strong, .user-brand strong {
  color: var(--ink);
}
.entry-lead, .login-entry-hint {
  margin: 0 auto 24px;
  color: var(--ink-2);
  text-align: left;
  line-height: 1.65;
  font-weight: 400;
}
.entry-lead {
  max-width: 620px;
}
.login-entry-hint {
  max-width: 360px;
}
.entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.entry-card {
  min-height: 132px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
  color: var(--text);
  display: grid;
  align-content: start;
  gap: 8px;
}
.entry-card:hover {
  color: var(--text);
  border-color: rgba(37,99,235,.36);
  transform: translateY(-2px);
}
.entry-card span {
  color: var(--teal);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
}
.entry-card strong {
  font-size: 20px;
  line-height: 1.25;
  color: var(--ink);
}
.entry-card em {
  color: var(--ink-2);
  font-style: normal;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.login-form {
  display: grid;
  gap: 20px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.tabs {
  text-align: center;
  color: var(--accent);
  font-weight: 800;
}
.tabs span {
  display: inline-block;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  color: var(--info);
}
.field {
  min-height: 40px;
  position: relative;
  display: block;
}
.field input, .field select, .field textarea {
  height: 40px;
  padding: 0 12px;
}
.field textarea {
  min-height: 92px;
  padding-top: 10px;
  resize: vertical;
}
.login-form .field input {
  background: var(--tint-info);
  padding-left: 36px;
}
.login-form .recovery-field {
  height: 92px;
}
.login-form .recovery-field textarea {
  background: var(--tint-info);
  padding-left: 12px;
}
.icon-mail::before, .icon-lock::before, .icon-shield::before, .icon-user::before {
  position: absolute;
  left: 12px;
  top: 11px;
  color: var(--muted-2);
  z-index: 1;
  font-size: 14px;
}
.login-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: -4px;
}
.login-links.single {
  justify-content: center;
}
.invite-hint {
  min-height: 20px;
  color: var(--ink-2);
  text-align: center;
  font-size: 13px;
  margin-top: -10px;
  padding: 9px 10px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  line-height: 1.55;
}
.login-button {
  height: 42px;
  width: 100%;
  font-size: 17px;
  font-weight: 800;
}
.form-msg {
  margin: -8px 0 0;
}
.login-footer {
  position: relative;
  text-align: center;
  color: var(--ink-3);
  padding: 0 16px 26px;
}
.login-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px 28px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.login-footer-links a {
  color: var(--ink-2);
  line-height: 1.6;
}
.login-footer-links a:hover {
  color: var(--accent);
}
.login-footer p {
  margin: 0;
}
.app-view {
  min-height: 100vh;
  display: flex;
}
.sidebar {
  width: 264px;
  background: var(--ground);
  color: var(--ink);
  flex: 0 0 auto;
  transition: width .2s ease, transform .2s ease;
  overflow-y: auto;
}
.sidebar.collapsed {
  width: 74px;
}
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9;
  border: 0;
  background: rgba(15,23,42,.46);
}
.side-brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  color: var(--on-accent);
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  border-bottom: 1px solid rgba(15,26,36,0.044);
}
.side-menu {
  padding: 12px 10px 24px;
}
.menu-item, .menu-parent {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  color: var(--ink-2);
  border: 0;
  width: 100%;
  background: transparent;
  text-align: left;
  border-radius: var(--radius-sm);
}
.menu-item:hover, .menu-parent:hover {
  background: rgba(15,26,36,0.036);
  color: var(--on-accent);
}
.menu-parent {
  justify-content: flex-start;
  cursor: pointer;
}
.menu-parent .caret {
  margin-left: auto;
  line-height: 1;
  transition: transform .18s ease;
}
.menu-group.open .menu-parent .caret {
  transform: rotate(180deg);
}
.menu-item.active {
  background: var(--brand);
  color: var(--on-accent);
}
.menu-icon {
  width: 18px;
  text-align: center;
  flex: 0 0 auto;
}
.menu-label {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
.submenu {
  margin: 4px 0 8px;
  padding: 4px;
  border-radius: var(--radius);
  background: rgba(15,26,36,0.064);
}
.submenu[hidden] {
  display: none;
}
.submenu .menu-item {
  padding-left: 34px;
  min-height: 38px;
}
.sidebar.collapsed .menu-label, .sidebar.collapsed .caret {
  display: none;
}
.sidebar.collapsed .side-brand strong {
  display: none;
}
.sidebar.collapsed .menu-item, .sidebar.collapsed .menu-parent {
  justify-content: center;
  padding: 0;
}
.sidebar.collapsed .submenu {
  display: none;
}
.sidebar.collapsed .submenu .menu-item {
  padding-left: 0;
}
.shell {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: var(--topbar-h);
  background: rgba(15,26,36,0.050);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid rgba(34,48,65,.88);
  z-index: 2;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  border-radius: var(--radius-sm);
  display: inline-grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
}
.icon-btn:hover {
  background: var(--surface-3);
  border-color: var(--line);
  transform: translateY(-1px);
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}
.account {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-btn {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  padding: 0;
  height: 34px;
  text-align: left;
}
.account-btn:hover {
  color: var(--accent);
}
.content {
  flex: 1;
  overflow: auto;
}
.page-head {
  min-height: 92px;
  background: var(--surface);
  padding: 16px 24px;
  border-bottom: 1px solid rgba(34,48,65,.80);
}
.breadcrumb {
  color: var(--muted);
  margin-bottom: 13px;
}
h1 {
  font-size: 23px;
  margin: 0;
}
h2 {
  margin: 0 0 14px;
  font-size: 18px;
}
.page-body {
  padding: 24px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 22px;
  color: var(--ink-2);
  min-width: 0;
}
.panel > * {
  min-width: 0;
}
.toolbar {
  background: rgba(15,26,36,0.050);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  margin-bottom: 18px;
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 52px;
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px 22px;
  margin-bottom: 22px;
  align-items: end;
}
.filter-grid .label {
  display: grid;
  grid-template-columns: max-content minmax(150px, 1fr);
  align-items: center;
  gap: 10px 12px;
  color: var(--ink-2);
  font-weight: 700;
  min-width: 0;
}
.filter-grid .label > span:first-child {
  white-space: nowrap;
  overflow-wrap: normal;
}
.label input, .label select {
  height: 36px;
  padding: 0 10px;
}
.filter-grid .wide {
  grid-column: span 2;
}
.filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
[id$="Table"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
table {
  width: 100%;
  border-collapse: collapse;
}
.table-wrap table {
  min-width: 860px;
}
th, td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 13px 12px;
  text-align: left;
  white-space: nowrap;
}
.panel > table {
  table-layout: fixed;
}
.panel > table th, .panel > table td {
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: top;
}
th:last-child, td:last-child {
  border-right: 0;
}
tr:last-child td {
  border-bottom: 0;
}
th {
  background: var(--raised);
  font-weight: 800;
  color: var(--ink);
}
tbody tr {
  transition: background-color .16s ease, transform .16s ease;
}
tbody tr:hover td {
  background: var(--surface-2);
}
tr:nth-child(even) td {
  background: var(--surface-2);
}
.empty {
  min-height: 160px;
  color: var(--muted-2);
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--surface);
}
.empty::before {
  content: "▱";
  display: block;
  font-size: 46px;
  color: var(--ink);
  margin-bottom: 2px;
}
.status-normal, .yes {
  color: var(--green);
  font-weight: 800;
}
.status-expired, .status-disabled, .status-rejected, .status-cancelled, .no {
  color: var(--red);
  font-weight: 800;
}
.status-pending {
  color: var(--amber);
  font-weight: 800;
}
.status-paid, .status-approved, .status-processed {
  color: var(--teal);
  font-weight: 800;
}
.tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.muted {
  color: var(--muted);
}
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--raised);
  color: var(--ink-2);
  font-weight: 800;
}
.pagination-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pagination-actions button[disabled] {
  opacity: .45;
  cursor: not-allowed;
}
.pagination-warning {
  color: var(--amber);
  overflow-wrap: anywhere;
}
.page-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 13px;
  white-space: nowrap;
}
.page-jump input {
  width: 72px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.reward-preview {
  min-width: 220px;
  display: grid;
  gap: 4px;
  white-space: normal;
  line-height: 1.45;
}
.reward-preview strong {
  color: var(--ink);
}
.reward-preview span, .reward-preview small {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.reward-preview.is-ok strong {
  color: var(--teal);
}
.reward-preview.is-warn strong {
  color: var(--amber);
}
.reward-preview.is-muted strong {
  color: var(--muted);
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 16px;
}
.stat-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.stat-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--surface);
}
.stat-card:hover {
  transform: translateY(-2px);
}
.stat-card {
  color: var(--ink-2);
}
.stat-card strong {
  display: block;
  font-size: 29px;
  margin-top: 8px;
  color: var(--ink);
}
.runtime-overview {
  margin-top: 18px;
}
.runtime-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}
.runtime-tile, .runtime-row {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px;
  display: grid;
  gap: 7px;
  align-content: start;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.runtime-tile {
  width: 100%;
  text-align: left;
}
.runtime-tile:hover {
  border-color: var(--border-info);
  background: var(--tint-info);
}
.runtime-tile span, .runtime-row span {
  color: var(--muted);
  font-size: 13px;
}
.runtime-tile strong, .runtime-row strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1.1;
}
.runtime-tile em {
  color: var(--ink-2);
  font-style: normal;
  line-height: 1.45;
}
.runtime-row em, .runtime-row small {
  color: var(--ink-2);
  font-style: normal;
  line-height: 1.45;
}
.runtime-row strong {
  font-size: 16px;
  line-height: 1.45;
}
.runtime-row.wide {
  grid-column: span 2;
}
.runtime-registration {
  border-left: 4px solid var(--amber);
}
.runtime-registration.is-ok {
  border-left-color: var(--teal);
  background: var(--tint-positive);
}
.runtime-registration.is-warn {
  border-left-color: var(--amber);
  background: var(--tint-warning);
}
.runtime-registration.is-bad {
  border-left-color: var(--negative);
  background: var(--tint-negative);
}
.runtime-registration small {
  display: block;
  overflow-wrap: anywhere;
}
.runtime-data-health {
  border-left: 4px solid var(--teal);
}
.runtime-data-health.is-warn {
  border-left-color: var(--amber);
  background: var(--tint-warning);
}
.runtime-data-health.is-ok {
  border-left-color: var(--teal);
  background: var(--tint-positive);
}
.runtime-data-health button {
  justify-self: start;
}
.data-health-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.data-health-note {
  margin-bottom: 0;
}
.data-health-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}
.data-health-summary div {
  min-width: 0;
  min-height: 124px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--control);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px;
  display: grid;
  gap: 7px;
  align-content: start;
}
.data-health-summary div.is-ok {
  border-left-color: var(--teal);
  background: var(--tint-positive);
}
.data-health-summary div.is-warn {
  border-left-color: var(--amber);
  background: var(--tint-warning);
}
.data-health-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.data-health-summary strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.data-health-summary p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.data-health-warning {
  min-width: 0;
  border: 1px solid var(--border-warning);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
  background: var(--tint-warning);
  color: var(--warning);
  padding: 12px 14px;
  display: grid;
  gap: 6px;
  overflow-wrap: anywhere;
}
.data-health-warning p {
  margin: 0;
  line-height: 1.55;
}
.backup-risk-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  min-width: 0;
}
.backup-risk-grid div {
  min-width: 0;
  min-height: 128px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--control);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px;
  display: grid;
  gap: 7px;
  align-content: start;
}
.backup-risk-grid div.is-ok {
  border-left-color: var(--teal);
  background: var(--tint-positive);
}
.backup-risk-grid div.is-warn {
  border-left-color: var(--amber);
  background: var(--tint-warning);
}
.backup-risk-grid div.is-bad {
  border-left-color: var(--negative);
  background: var(--tint-negative);
}
.backup-risk-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.backup-risk-grid strong {
  color: var(--text);
  font-size: 20px;
  overflow-wrap: anywhere;
}
.backup-risk-grid p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.backup-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.backup-filter {
  margin-bottom: 0;
}
.backup-source {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-weight: 900;
  white-space: nowrap;
}
.backup-source.is-auto {
  border-color: var(--border-info);
  background: var(--tint-info);
  color: var(--info);
}
.backup-source.is-manual {
  border-color: var(--border-positive);
  background: var(--tint-positive);
  color: var(--positive);
}
.backup-source.is-warn {
  border-color: var(--border-warning);
  background: var(--tint-warning);
  color: var(--warning);
}
.backup-restore-warning {
  border-color: var(--border-warning);
  background: var(--tint-warning);
}
.backup-policy-note {
  margin-bottom: 12px;
}
.backup-policy-form {
  margin-bottom: 22px;
}
.backup-delete-warning {
  border-color: var(--border-negative);
  background: var(--tint-negative);
}
.activity-panel {
  display: grid;
  gap: 12px;
}
.activity-panel .form-hint {
  margin-bottom: 2px;
}
.activity-status {
  margin-top: 2px;
}
.activity-badge {
  border: 1px solid var(--line);
  border-left: 4px solid var(--control);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 12px;
  display: grid;
  gap: 5px;
  line-height: 1.5;
}
.activity-badge strong {
  color: var(--text);
}
.activity-badge span {
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.activity-badge.is-ok {
  border-left-color: var(--teal);
  background: var(--tint-positive);
}
.activity-badge.is-warn {
  border-left-color: var(--amber);
  background: var(--tint-warning);
}
.activity-badge.is-muted {
  border-left-color: var(--control);
  background: var(--raised);
}
.mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.mini-stats span {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.ip-waf-guidance {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.ip-waf-guidance div {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px;
  min-height: 136px;
}
.ip-waf-guidance span {
  display: block;
  color: var(--muted);
  font-weight: 900;
}
.ip-waf-guidance strong {
  display: block;
  margin: 6px 0;
  color: var(--text);
  overflow-wrap: anywhere;
}
.ip-waf-guidance p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.55;
}
.billing-balance p {
  font-size: 32px;
  line-height: 1.2;
  margin: 12px 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.billing-balance span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.billing-rule-note {
  border-left: 4px solid var(--accent);
  background: var(--surface-2);
}
.billing-plan-note, .billing-rule-note {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.billing-rule-note p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.7;
}
.billing-plan-compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  max-height: 360px;
  overflow: auto;
}
.billing-plan-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 12px;
  display: grid;
  gap: 10px;
}
.billing-plan-card.is-current {
  border-color: var(--accent);
}
.billing-plan-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.billing-plan-card-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
}
.billing-plan-card-head span {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}
.billing-plan-card dl {
  margin: 0;
  display: grid;
  gap: 6px;
}
.billing-plan-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  color: var(--ink-2);
}
.billing-plan-card dt, .billing-plan-card dd {
  margin: 0;
  min-width: 0;
}
.billing-plan-card dd {
  color: var(--text);
  font-weight: 800;
  text-align: right;
  overflow-wrap: anywhere;
}
.billing-plan-card p, .billing-plan-card small {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.billing-plan-switch-summary {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.billing-plan-switch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.billing-plan-switch-head span {
  color: var(--ink-2);
  font-weight: 700;
}
.billing-plan-switch-head strong {
  min-width: 0;
  color: var(--text);
  overflow-wrap: anywhere;
  text-align: right;
}
.billing-plan-switch-grid, .billing-plan-quota-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.billing-plan-switch-grid div, .billing-plan-quota-summary div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.billing-plan-switch-grid span, .billing-plan-quota-summary dt {
  display: block;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 800;
}
.billing-plan-switch-grid strong, .billing-plan-quota-summary dd {
  display: block;
  margin: 4px 0 0;
  color: var(--text);
  font-weight: 900;
  overflow-wrap: anywhere;
}
.billing-plan-switch-grid small {
  display: block;
  margin-top: 4px;
  color: var(--ink-2);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.billing-plan-switch-summary p, .billing-plan-tier-empty {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.billing-plan-tier-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.billing-plan-tier-summary span {
  max-width: 100%;
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  background: var(--tint-info);
  color: var(--info);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.billing-tier-editor {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.billing-tier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.billing-tier-head strong {
  color: var(--text);
}
.billing-tier-list {
  display: grid;
  gap: 10px;
}
.billing-tier-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.1fr) repeat(3, minmax(100px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.billing-tier-row label {
  margin: 0;
  min-width: 0;
}
.billing-tier-row .link-btn {
  min-height: 38px;
  white-space: nowrap;
}
.billing-tier-empty {
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  background: var(--surface);
}
.account-security p, .notice {
  color: var(--ink-2);
  line-height: 1.7;
}
.notice h2 {
  color: var(--ink);
}
.notice p {
  margin: 8px 0;
}
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
}
.doc-code {
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 18px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  border: 1px solid rgba(15,26,36,0.044);
}
.sdk-test-panel {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  display: grid;
  gap: 14px;
}
.sdk-test-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.sdk-test-head span {
  color: var(--accent);
  font-weight: 900;
}
.sdk-test-head h2 {
  margin: 4px 0 0;
  font-size: 20px;
}
.sdk-ready-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.sdk-ready-grid div, .sdk-checklist div, .sdk-usage-note {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 12px;
}
.sdk-ready-grid span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}
.sdk-ready-grid strong {
  display: block;
  margin: 5px 0;
  color: var(--text);
  overflow-wrap: anywhere;
}
.sdk-ready-grid p, .sdk-checklist p, .sdk-usage-note p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.55;
}
.sdk-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sdk-downloads strong {
  flex: 0 0 100%;
  color: var(--ink);
  font-size: 13px;
}
.sdk-downloads a {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--tint-info);
  color: var(--info);
  display: inline-flex;
  align-items: center;
  font-weight: 800;
}
.sdk-downloads a:hover {
  background: var(--tint-info);
  transform: translateY(-1px);
}
.sdk-resource-list {
  display: grid;
  gap: 8px;
  width: 100%;
}
.sdk-resource-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.sdk-resource-row strong {
  color: var(--text);
  overflow-wrap: anywhere;
}
.sdk-resource-row em {
  color: var(--warning);
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}
.sdk-resource-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
/* SDK 面板里的「下载源码 / 下载迁移说明 / 查看凭证」是纯文字链接，实测只有 18px 高，
   手指和鼠标都难命中。这里把热区补到 32px，同时保持文字链接的视觉样式（不加背景和边框）。 */
.sdk-resource-row a, .sdk-downloads a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.sdk-downloads a {
  padding-left: 12px;
  padding-right: 12px;
}
/* 表格内的「查看凭证」等文字链接热区不足（移动端卡片模式实测 21px），
   桌面与移动端统一补到 32px；移动端卡片本身有内边距，不会被撑破。 */
.table-wrap td a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding-top: 6px;
  padding-bottom: 6px;
}
@media (max-width: 900px) {.table-wrap td a {
    min-height: 36px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
}
.sdk-resource-admin table td {
  vertical-align: top;
}
.sdk-checklist {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.sdk-checklist div {
  min-height: 138px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 6px 10px;
  align-content: start;
}
.sdk-checklist span {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-weight: 900;
}
.sdk-checklist strong {
  align-self: center;
  color: var(--text);
}
.sdk-checklist p {
  grid-column: 2;
}
.sdk-sign-source {
  margin: 0;
}
.sdk-usage-note strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.42);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 20;
}
body.modal-open {
  overflow: hidden;
}
.modal-panel {
  width: min(640px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg); /* taste-skill-ignore: real dialog overlay */
  animation: modalIn .22s ease both;
}
.modal-panel header {
  min-height: 58px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 2;
}
.modal-panel h2 {
  font-size: 18px;
  margin: 0;
}
.modal-form {
  padding: 18px;
  display: grid;
  gap: 14px;
}
.workflow-summary {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px;
  display: grid;
  gap: 10px;
}
.operation-summary.is-danger {
  border-color: var(--border-negative);
  background: var(--tint-negative);
}
.workflow-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}
.workflow-summary strong {
  color: var(--text);
  overflow-wrap: anywhere;
  text-align: right;
}
.workflow-summary p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.55;
}
.operation-summary.is-danger p {
  color: var(--negative);
}
.workflow-reward {
  border-left: 4px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 10px;
  display: grid;
  gap: 5px;
}
.workflow-reward span, .workflow-reward small {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.workflow-reward strong {
  font-size: 22px;
}
.workflow-reward.is-ok {
  border-left-color: var(--teal);
  background: var(--tint-positive);
}
.workflow-reward.is-warn {
  border-left-color: var(--amber);
  background: var(--tint-warning);
}
.workflow-reward.is-muted {
  border-left-color: var(--control);
}
.form-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: center;
}
.form-row.textarea-row {
  align-items: start;
}
.form-row.check {
  grid-template-columns: 110px minmax(0, 1fr);
}
.form-row label {
  color: var(--ink-2);
  font-weight: 700;
}
.agent-price-config {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.agent-price-config strong {
  display: block;
  color: var(--text);
}
.agent-price-config p {
  margin: 4px 0 0;
  color: var(--ink-2);
  line-height: 1.55;
}
.agent-price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.agent-price-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--ink-2);
  font-weight: 800;
}
.agent-price-grid input {
  min-width: 0;
}
.textarea-field {
  height: 92px;
}
.wide-textarea {
  width: 100%;
  min-height: 180px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  line-height: 1.6;
  resize: vertical;
}
.check-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink-2);
  font-weight: 700;
  cursor: pointer;
}
.check-field input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}
.switch-label {
  align-items: center;
}
.switch-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.switch-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.switch-field i {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--control);
  transition: background-color .18s ease;
}
.switch-field i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--surface);
  transition: transform .18s ease;
}
.switch-field em {
  font-style: normal;
  min-width: 44px;
}
.switch-field em::before {
  content: "已关闭";
}
.switch-field:has(input:checked) {
  border-color: var(--border-positive);
  background: var(--tint-positive);
  color: var(--positive);
}
.switch-field:has(input:checked) i {
  background: var(--teal);
}
.switch-field:has(input:checked) i::after {
  transform: translateX(20px);
}
.switch-field:has(input:checked) em::before {
  content: "已开启";
}
.switch-field:has(input:focus-visible) {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
}
/* 长表单弹窗：操作区吸底，避免内容超过一屏时“取消/保存”被推到折叠线以下 */
.modal-form > .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin: 0 -18px -18px;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 24px rgba(15,26,36,.06);
}
.modal-form :is(input, select, textarea) { scroll-margin-bottom: 96px; }
.generated-summary {
  padding: 18px 18px 0;
  color: var(--ink-2);
}
.generated-summary strong {
  color: var(--text);
  font-size: 18px;
}
.generated-cards {
  width: calc(100% - 36px);
  min-height: 220px;
  margin: 14px 18px 0;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-family: Consolas, "Microsoft YaHei", monospace;
  line-height: 1.7;
  resize: vertical;
}
.toast {
  position: fixed;
  right: 24px;
  top: 80px;
  background: var(--code-bg);
  color: var(--on-accent);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); /* taste-skill-ignore: real toast overlay */
  z-index: 30;
  animation: toastIn .2s ease both;
}

@media (max-width: 900px) {.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  width: min(82vw, 288px);
  transform: translateX(-100%);
}
.sidebar.open {
  transform: translateX(0);
  width: min(82vw, 288px);
}
.filter-grid, .two-col, .cards {
  grid-template-columns: 1fr;
}
.filter-grid .wide {
  grid-column: span 1;
}
.page-body {
  padding: 16px;
}
.account {
  display: none;
}
}

@media (max-width: 640px) {.agent-hero {
  min-height: 184px;
  padding: 18px 16px;
}
.user-brand strong {
  font-size: 21px;
}
.user-admin-link {
  font-size: 13px;
}
.agent-main {
  width: calc(100vw - 20px);
  margin-top: -68px;
}
.agent-panel {
  border-radius: var(--radius);
}
.agent-panel {
  padding: 16px;
}
.user-inline-fields, .user-summary-grid, .user-info-list {
  grid-template-columns: 1fr;
}
.activity-badge {
  padding: 10px;
}
.backup-risk-grid, .data-health-summary {
  grid-template-columns: 1fr;
}
.pagination-bar {
  align-items: stretch;
  flex-direction: column;
}
.pagination-actions {
  width: 100%;
}
.pagination-actions button {
  flex: 1 1 120px;
}
.data-health-summary div {
  min-height: 0;
}
.agent-cost-preview {
  grid-template-columns: 1fr;
}
.billing-tier-row {
  grid-template-columns: 1fr;
}
.billing-tier-row .link-btn {
  width: 100%;
}
.captcha-row, .user-captcha-row {
  grid-template-columns: minmax(0, 1fr) 132px;
}
.agent-center {
  border-radius: var(--radius);
}
.user-center-head {
  align-items: flex-start;
  flex-direction: column;
}
.user-center-head .ghost {
  width: 100%;
}
.user-tabs {
  padding: 8px;
  flex-wrap: wrap;
  overflow-x: visible;
}
.user-tabs button {
  flex: 1 1 calc(50% - 6px);
  min-width: 112px;
}
.user-center-body {
  padding: 12px;
}
.agent-generated-head {
  align-items: flex-start;
  flex-direction: column;
}
.agent-generated-actions .small-btn {
  flex: 1 1 100%;
}
.agent-generated-box textarea {
  min-height: 220px;
}
.agent-action-form {
  padding: 12px;
}
.agent-settlement-guide {
  grid-template-columns: 1fr;
}
.agent-settlement-guide div {
  min-height: 0;
}
.agent-settlement-head {
  flex-direction: column;
}
.agent-settlement-head em {
  width: 100%;
  text-align: center;
}
.agent-transfer-row {
  grid-template-columns: 1fr;
}
.agent-transfer-row .small-btn {
  width: 100%;
}
.entry-panel, .login-panel {
  margin-top: 18px;
  padding: 22px;
}
.login-bg {
  display: none;
}
.login-brand {
  font-size: 23px;
  margin-bottom: 24px;
}
.entry-lead, .login-entry-hint {
  margin-top: -12px;
}
.entry-grid {
  grid-template-columns: 1fr;
}
.entry-card {
  min-height: 0;
}
.login-form {
  gap: 17px;
}
.login-footer {
  padding: 0 14px 18px;
}
.login-footer-links {
  gap: 6px 18px;
}
.topbar {
  padding: 0 12px;
}
.top-actions {
  gap: 8px;
}
.top-actions .avatar {
  display: none;
}
.page-head {
  height: auto;
  min-height: 78px;
  padding: 12px 16px;
}
.page-body {
  padding: 12px;
}
.panel {
  padding: 14px;
  margin-bottom: 14px;
}
.runtime-grid {
  grid-template-columns: 1fr;
}
.runtime-row.wide {
  grid-column: span 1;
}
.ip-waf-guidance {
  grid-template-columns: 1fr;
}
.ip-waf-guidance div {
  min-height: 0;
}
.sdk-test-panel {
  padding: 12px;
}
.sdk-test-head {
  flex-direction: column;
}
.sdk-test-head .small-btn {
  width: 100%;
}
.sdk-ready-grid, .sdk-checklist {
  grid-template-columns: 1fr;
}
.sdk-checklist div {
  min-height: 0;
}
.sdk-downloads a {
  flex: 1 1 calc(50% - 8px);
  justify-content: center;
}
.sdk-resource-row {
  grid-template-columns: 1fr;
  align-items: stretch;
}
.sdk-resource-row em {
  white-space: normal;
}
.toolbar {
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.toolbar .icon-btn {
  flex: 0 0 36px;
}
.toolbar .primary, .toolbar .ghost:not(.icon-btn) {
  flex: 1 1 calc(50% - 8px);
  min-width: 112px;
  padding: 8px 10px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}
.filter-grid .label {
  grid-template-columns: 1fr;
  gap: 6px;
}
.filter-actions {
  flex-wrap: wrap;
}
.filter-actions .primary, .filter-actions .ghost {
  flex: 1 1 120px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}
.table-wrap {
  overflow: visible;
  border: 0;
  background: transparent;
}
.table-wrap table {
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0 10px;
}
.table-wrap thead {
  display: none;
}
.table-wrap tbody, .table-wrap tr, .table-wrap td {
  display: block;
  width: 100%;
}
.table-wrap tr {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 8px 10px;
}
.table-wrap tr:nth-child(even) td, .table-wrap tr:hover td {
  background: transparent;
}
.table-wrap td {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 9px 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.table-wrap td:last-child {
  border-bottom: 0;
}
.table-wrap td::before {
  content: attr(data-label);
  color: var(--muted);
  font-weight: 800;
}
.table-wrap td[data-label="操作"] {
  display: block;
  padding-top: 11px;
}
.table-wrap td[data-label="操作"]::before {
  display: none;
}
.actions {
  flex-wrap: wrap;
  gap: 8px;
}
.actions .primary, .actions .ghost, .actions .link-btn {
  flex: 1 1 112px;
  min-height: 32px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}
.actions .link-btn {
  text-align: center;
}
.doc-code {
  white-space: pre-wrap;
  word-break: break-word;
}
.modal {
  padding: 10px;
  align-items: end;
}
.modal-panel {
  width: 100%;
  max-height: calc(100vh - 20px);
  border-radius: var(--radius) var(--radius) 0 0;
}
.form-row, .form-row.check {
  grid-template-columns: 1fr;
  gap: 7px;
}
.form-row.check > span:first-child {
  display: none;
}
.agent-price-grid {
  grid-template-columns: 1fr;
}
.check-field {
  width: 100%;
}
.switch-field {
  width: 100%;
  justify-content: space-between;
}
.workflow-summary > div {
  display: grid;
  gap: 4px;
}
.workflow-summary strong {
  text-align: left;
}
.modal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.modal-actions .primary, .modal-actions .ghost {
  width: 100%;
}
.modal-actions .primary, .modal-actions .ghost, .filter-actions .primary, .filter-actions .ghost, .user-submit, .captcha-action {
  height: auto;
}
.generated-cards {
  min-height: 260px;
}
.toast {
  left: 12px;
  right: 12px;
  top: auto;
  bottom: 16px;
  text-align: center;
}
}

@media (max-width: 420px) {.captcha-row, .user-captcha-row {
  grid-template-columns: 1fr;
}
.captcha-box {
  width: 100%;
}
}

@media (prefers-reduced-motion: reduce) {.modal-panel, .toast {
  animation: none !important;
}
}

/* ===== 本机配置文件（.env）面板 ===== */
.env-groups {
  display: grid;
  gap: 12px;
}
.env-group {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 0 14px 12px;
}
.env-group > summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  font-weight: 700;
  color: var(--text);
}
.env-group > summary::-webkit-details-marker {
  display: none;
}
.env-group > summary::before {
  content: "▸";
  color: var(--ink-3);
  transition: transform .15s ease;
}
.env-group[open] > summary::before {
  content: "▾";
}
.env-group .filter-grid {
  margin: 0 0 4px;
}
.filter-grid .env-field {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 8px;
  padding: 12px 0 4px;
  border-top: 1px dashed var(--line);
}
.filter-grid .env-field > span:first-child {
  white-space: normal;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.env-field code {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 4px;
}
.env-field input, .env-field select {
  width: 100%;
  min-width: 0;
}
.env-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--raised-2);
  color: var(--ink-3);
}
.env-badge.global {
  background: var(--tint-warning);
  color: var(--warning);
}
.env-badge.ok {
  background: var(--tint-positive);
  color: var(--positive);
}
.env-desc {
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-3);
}
.env-masked {
  color: var(--positive);
  word-break: break-all;
}
/* ============================================================
   V2 · Framed sheet — 2026-10-28
   Dealt style: framed-sheet / seed 524623700 / light
   Sidebar and top bar share one tinted L-frame; the page is a
   white sheet inset 8px, radius 16, 1px edge, no shadow.
   ============================================================ */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/plex-sans-400.woff?v=20261028-ui-framed-sheet") format("woff");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/plex-sans-500.woff?v=20261028-ui-framed-sheet") format("woff");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/plex-sans-600.woff?v=20261028-ui-framed-sheet") format("woff");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/plex-mono-400.woff?v=20261028-ui-framed-sheet") format("woff");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/plex-mono-500.woff?v=20261028-ui-framed-sheet") format("woff");
}
html, body {
  background: var(--ground);
  color: var(--ink);
}
body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  background-image: none;
  -webkit-font-smoothing: antialiased;
}
h1 {
  font-size: var(--fs-title);
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.25;
}
h2 {
  font-size: var(--fs-section);
  font-weight: 600;
  letter-spacing: -.005em;
}
a {
  color: var(--brand);
}
a:hover {
  color: var(--brand-strong);
}
code, pre, .doc-code, .mono {
  font-family: var(--font-mono);
}
.num, .stat-card strong, .runtime-tile strong, .runtime-row strong, .agent-balance-strip strong, .mini-stats strong, td, th {
  font-variant-numeric: tabular-nums;
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: var(--brand);
  transform: none;
  position: relative;
  display: inline-block;
  flex: none;
  vertical-align: middle;
}
.brand-mark::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  box-sizing: content-box;
}
.brand-mark::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 9px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
}
.brand-mark::before {
  content: "";
  position: absolute;
  left: 15.5px;
  top: 18px;
  width: 2.5px;
  height: 8px;
  background: var(--surface);
  border-radius: 1px;
}
.brand-mark.small {
  width: 20px;
  height: 20px;
  border-width: 0;
  border-radius: 5px;
}
.brand-mark.small::before {
  left: 6px;
  top: 4px;
  width: 6px;
  height: 6px;
  border-width: 1.5px;
}
.brand-mark.small::after {
  left: 9px;
  top: 11px;
  width: 1.5px;
  height: 4px;
}
.primary, .ghost {
  border-radius: var(--radius-control);
  min-height: var(--control-height);
  padding: 7px 14px;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0;
}
.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-accent);
}
.primary:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  transform: translateY(-1px);
}
.ghost {
  background: var(--surface);
  border-color: var(--control);
  color: var(--ink);
}
.ghost:hover {
  background: var(--raised);
  border-color: var(--control);
  transform: none;
}
.small-btn {
  min-height: 28px;
  padding: 5px 10px;
  font-size: 12px;
}
.link-btn {
  color: var(--brand);
}
.link-btn:hover {
  color: var(--brand-strong);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.danger-text {
  color: var(--negative);
  border-color: var(--border-negative);
}
.danger-text:hover {
  background: var(--pill-negative-bg);
  color: var(--pill-negative-ink);
}
.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: var(--ink-2);
}
.icon-btn:hover {
  background: var(--raised);
  border-color: transparent;
  transform: none;
}
button:disabled {
  opacity: .5;
}
.app-view {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--ground);
}
.sidebar {
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  height: 100vh;
  background: var(--ground);
  color: var(--ink);
  overflow-y: auto;
  padding: 0 10px 12px;
  display: flex;
  flex-direction: column;
  transition: width .18s ease, flex-basis .18s ease, transform .2s ease;
}
.sidebar.collapsed {
  width: 72px;
  flex-basis: 72px;
}
.sidebar-backdrop {
  background: rgba(15,26,36,0.128);
}
.side-brand {
  height: var(--topbar-h);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  border-bottom: 0;
}
.side-brand strong {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-menu {
  padding: 6px 0 20px;
}
.side-foot {
  margin-top: auto;
  padding: 12px 10px 4px;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .02em;
}
.menu-item, .menu-parent {
  min-height: 34px;
  padding: 0 10px;
  gap: 9px;
  border-radius: 6px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 400;
}
.menu-item:hover, .menu-parent:hover {
  background: var(--raised);
  color: var(--ink);
}
.menu-parent .caret {
  margin-left: auto;
  font-size: 11px;
  color: var(--ink-3);
}
.menu-item.active {
  background: transparent;
  color: var(--ink);
  font-weight: 500;
  position: relative;
}
.menu-item.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 1px;
  height: 2px;
  border-radius: 1px;
  background: var(--brand);
}
.submenu {
  margin: 0 0 6px;
  padding: 0 0 0 22px;
  background: transparent;
  border-radius: 0;
}
.submenu .menu-item {
  padding-left: 10px;
  min-height: 32px;
}
.menu-icon {
  width: 16px;
  font-size: 13px;
  color: var(--ink-3);
  text-align: center;
  flex: 0 0 16px;
}
.menu-item.active .menu-icon {
  color: var(--brand-strong);
}
.sidebar.collapsed .side-foot {
  display: none;
}
.app-main {
  flex: 1 1 auto;
  min-width: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 8px 8px 0;
}
.topbar {
  height: var(--topbar-h);
  flex: 0 0 var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  background: transparent;
  border-bottom: 0;
  z-index: 2;
}
.top-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--active);
  position: relative;
}
.avatar::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-3);
}
.account-btn {
  color: var(--ink-2);
  font-size: 13px;
  height: 32px;
}
.account-btn:hover {
  color: var(--ink);
}
.sheet {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sheet);
  overflow: hidden;
}
.content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.page-head {
  min-height: 0;
  background: transparent;
  padding: 24px 24px 0;
  border-bottom: 0;
}
.breadcrumb {
  color: var(--ink-3);
  font-size: 12px;
  margin-bottom: 6px;
}
.page-body {
  padding: 16px 24px 28px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  margin-bottom: 16px;
  color: var(--ink);
}
.panel h2 {
  margin-bottom: 12px;
}
.toolbar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 8px;
  margin-bottom: 16px;
  min-height: 48px;
}
.toolbar .primary, .toolbar .ghost {
  min-height: 32px;
}
.filter-grid {
  gap: 14px 18px;
  margin-bottom: 18px;
}
.filter-grid .label {
  grid-template-columns: max-content minmax(140px,1fr);
  gap: 6px 10px;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 12px;
}
.label input, .label select {
  height: 32px;
  padding: 0 10px;
}
.field input, .field select {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--control);
  border-radius: var(--radius-control);
  background: var(--surface);
}
.field textarea {
  min-height: 96px;
  padding: 10px 12px;
  border: 1px solid var(--control);
  border-radius: var(--radius-control);
  background: var(--surface);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
}
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}
th, td {
  border-right: 0;
  border-bottom: 1px solid var(--rule);
  padding: 10px 14px;
}
th {
  background: transparent;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 12px;
}
tbody tr {
  transition: background-color .12s ease;
}
tbody tr:hover td {
  background: var(--raised);
}
tr:nth-child(even) td {
  background: transparent;
}
tbody tr:last-child td {
  border-bottom: 0;
}
.empty {
  background: transparent;
  color: var(--ink-2);
  min-height: 140px;
}
.empty::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 1px;
  background: var(--control);
  font-size: 0;
  margin: 0 auto 10px;
}
.tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--raised);
  color: var(--ink-2);
  font-size: 12px;
}
.pagination-bar {
  margin-top: 14px;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 12px;
}
.page-jump input {
  border-color: var(--control);
  border-radius: var(--radius-control);
}
.actions {
  gap: 6px;
}
.cards {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  color: var(--ink-2);
  font-size: 12px;
  overflow: visible;
  min-width: 0;
  overflow-wrap: anywhere;
}
.stat-card strong {
  display: block;
  font-size: var(--fs-kpi);
  font-weight: 600;
  margin-top: 6px;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
.stat-card:hover {
  transform: none;
  border-color: var(--control);
}
.runtime-tile, .runtime-row {
  border-color: var(--border);
  background: var(--surface);
  border-radius: var(--radius-card);
}
.runtime-tile:hover {
  border-color: var(--control);
  background: var(--surface);
}
.runtime-tile strong, .runtime-row strong {
  font-size: 20px;
  font-weight: 600;
}
.runtime-tile span, .runtime-row span {
  color: var(--ink-3);
  font-size: 12px;
}
.runtime-tile em, .runtime-row em, .runtime-row small {
  color: var(--ink-2);
}
.user-summary-grid div, .user-info-list div {
  background: var(--raised);
  border-color: var(--border);
}
.workflow-summary, .operation-summary, .data-health-panel, .backup-panel, .sdk-test-panel {
  border-color: var(--border);
}
.modal-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(15,26,36,0.072); /* taste-skill-ignore: real dialog overlay */
}
.modal-panel header {
  border-bottom: 1px solid var(--border);
}
.toast {
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(15,26,36,0.064); /* taste-skill-ignore: real toast overlay */
  background: var(--ink);
  color: var(--on-accent);
}
.entry-view, .login-view {
  background: var(--ground);
}
.login-bg {
  display: none;
}
.entry-panel, .login-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-top: 0;
  align-self: center;
}
.entry-panel {
  width: min(820px, calc(100vw - 32px));
  padding: 32px;
}
.login-panel {
  width: min(420px, calc(100vw - 32px));
  padding: 32px;
}
.login-brand {
  font-size: 20px;
  font-weight: 600;
  gap: 12px;
  margin-bottom: 22px;
}
.login-brand strong, .user-brand strong {
  color: var(--ink);
}
.entry-lead, .login-entry-hint {
  color: var(--ink-2);
  font-weight: 400;
  margin: -12px auto 24px;
  font-size: 13px;
}
.entry-grid {
  gap: 12px;
}
.entry-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  min-height: 124px;
  gap: 6px;
}
.entry-card:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}
.entry-card span {
  color: var(--ink-3);
  font-weight: 500;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}
.entry-card strong {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}
.entry-card em {
  color: var(--ink-2);
  font-size: 13px;
}
.login-form {
  background: transparent;
  border: 0;
  padding: 0;
  margin-top: 0;
  gap: 16px;
}
.tabs {
  text-align: left;
  font-weight: 500;
  color: var(--ink-2);
  border-bottom: 1px solid var(--border);
}
.tabs span {
  display: inline-block;
  padding: 0 0 9px;
  margin-right: 20px;
  border-bottom: 2px solid transparent;
  color: var(--ink-2);
  font-weight: 500;
}
.tabs span.active, .tabs span:first-child {
  color: var(--ink);
  border-bottom-color: var(--brand);
}
.field input, .login-form .field input {
  background: var(--surface);
  padding-left: 12px;
}
.login-form .recovery-field textarea {
  background: var(--surface);
  padding-left: 12px;
}
.login-links {
  margin-top: 0;
}
.invite-hint {
  border-left: 0;
  background: var(--raised);
  color: var(--ink-2);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
}
.login-button {
  height: 40px;
  font-size: 14px;
  font-weight: 500;
}
.form-msg {
  font-size: 12px;
}
.login-footer {
  color: var(--ink-3);
  font-size: 12px;
}
.login-footer-links a {
  color: var(--ink-2);
}
.login-footer-links a:hover {
  color: var(--brand);
}
.agent-view {
  background: var(--ground);
}
.agent-main {
  margin: 0 auto;
  padding-top: 20px;
}
.agent-hero::after {
  display: none;
}
.agent-hero {
  min-height: 80px;
  padding: 0 clamp(20px, 3vw, 34px);
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.user-brand {
  align-items: center;
  gap: 10px;
}
.user-brand strong {
  font-size: 15px;
  font-weight: 600;
}
.user-brand span {
  color: var(--ink-3);
  font-size: 12px;
}
.user-admin-link {
  color: var(--ink-2);
  border-color: var(--border);
  border-radius: 6px;
}
.agent-panel, .agent-center {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.user-tabs {
  border-bottom: 1px solid var(--border);
  gap: 0;
}
.user-tabs button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--ink-2);
  padding: 10px 14px;
  font-weight: 500;
  font-size: 13px;
}
.user-tabs button.active {
  color: var(--ink);
  border-bottom-color: var(--brand);
  background: transparent;
}
.user-tabs button:hover {
  color: var(--ink);
}
.user-center-head {
  background: transparent;
  border-bottom: 1px solid var(--border);
  min-height: 60px;
}
.user-center-head strong {
  font-size: 16px;
  font-weight: 600;
}
.user-center-head span {
  color: var(--ink-3);
  font-size: 12px;
}
.captcha-box {
  height: 38px;
  border: 1px solid var(--control);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink-2);
  font: 500 12px/36px var(--font-sans);
}
.captcha-box:hover {
  border-color: var(--brand);
  background: var(--surface);
  transform: none;
}
.user-submit {
  height: 40px;
  font-weight: 500;
}
.user-summary-grid div, .user-info-list div {
  background: var(--raised);
  border-color: var(--border);
}
.user-msg, .form-msg {
  color: var(--negative);
  font-size: 12px;
}
.sidebar-backdrop {
  z-index: 15;
}
.env-group {
  background: var(--surface);
  border-color: var(--border);
}
.env-group > summary {
  font-weight: 600;
}
.billing-plan-card, .billing-plan-switch-summary, .billing-tier-editor, .backup-panel, .data-health-panel, .sdk-test-panel, .workflow-summary, .operation-summary {
  border-color: var(--border);
}
.billing-plan-card.is-current {
  border-color: var(--brand);
}
.doc-code {
  background: var(--code-bg);
  color: var(--ink);
  border-radius: 8px;
}

@media (max-width: 1100px) {.cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: 900px) {.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: min(82vw, 288px);
  flex-basis: auto;
  height: 100vh;
  transform: translateX(-100%);
  background: var(--ground);
  border-right: 1px solid var(--border);
}
.sidebar.open {
  transform: translateX(0);
}
.sidebar.collapsed {
  width: min(82vw, 288px);
  flex-basis: auto;
}
.app-main {
  padding: 0 8px 8px;
}
.sheet {
  border-radius: 12px;
}
.topbar {
  padding: 0 4px;
}
.filter-grid, .two-col {
  grid-template-columns: 1fr;
}
.filter-grid .wide {
  grid-column: span 1;
}
.page-head {
  padding: 20px 16px 0;
}
.page-body {
  padding: 12px 16px 22px;
}
.account {
  display: none;
}
}
@media (max-width: 640px) {.app-main {
  padding: 0 6px 6px;
}
.sheet {
  border-radius: 10px;
}
.topbar {
  padding: 0 2px;
}
.page-head {
  padding: 18px 16px 0;
}
.page-body {
  padding: 12px 16px 20px;
}
.cards {
  grid-template-columns: 1fr;
}
.stat-card strong {
  font-size: 22px;
}
.agent-hero {
  min-height: 68px;
  padding: 0 16px;
}
.agent-main {
  margin-top: 0;
  width: 100%;
}
.agent-panel {
  padding: 16px;
}
.entry-panel, .login-panel {
  padding: 22px;
  margin: 16px auto;
}
.entry-grid {
  grid-template-columns: 1fr;
}
.entry-card {
  min-height: 0;
  padding: 16px;
}
.login-brand {
  font-size: 18px;
  margin-bottom: 18px;
}
.user-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.user-tabs::-webkit-scrollbar {
  display: none;
}
.user-tabs button {
  flex: 0 0 auto;
  min-width: 0;
}
.user-inline-fields, .user-summary-grid, .user-info-list {
  grid-template-columns: 1fr;
}
.captcha-row, .user-captcha-row {
  grid-template-columns: 1fr 120px;
}
.toolbar {
  flex-wrap: wrap;
}
.table-wrap table {
  min-width: 0;
}
.pagination-bar {
  align-items: stretch;
  flex-direction: column;
}
.pagination-actions button {
  flex: 1 1 120px;
}
}
@media (max-width: 420px) {.captcha-row, .user-captcha-row {
  grid-template-columns: 1fr;
}
.captcha-box {
  width: 100%;
}
}
/* entry shell */
.entry-view {
  display: block;
  min-height: 100vh;
  background: var(--ground);
}
.entry-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.entry-view .entry-top {
  padding: 18px 0 10px;
}
.entry-top {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.entry-brand {
  justify-content: flex-start;
  font-size: 16px;
  color: var(--ink);
  gap: 10px;
  margin: 0;
}
.entry-brand strong {
  font-weight: 600;
}
.entry-top-links {
  display: flex;
  gap: 20px;
  font-size: 13px;
}
.entry-top-links a {
  color: var(--ink-2);
}
.entry-top-links a:hover {
  color: var(--ink);
}
.entry-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0,1.02fr) minmax(360px,.98fr);
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
  padding: 24px 0 40px;
}
.entry-kicker {
  font-size: 12px;
  color: var(--brand);
  font-weight: 500;
  margin: 0 0 14px;
  letter-spacing: .02em;
}
.entry-intro h1 {
  font-size: 34px;
  line-height: 1.22;
  font-weight: 600;
  letter-spacing: -.02em;
  margin: 0 0 16px;
  max-width: 12em;
}
.entry-lead {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.7;
  max-width: 34em;
  margin: 0 0 28px;
}
.entry-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}
.entry-facts li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}
.entry-facts strong {
  font-weight: 500;
  color: var(--ink);
}
.entry-facts span {
  color: var(--ink-2);
}
.entry-card {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "tag tag" "title go" "desc desc";
  align-content: start;
  gap: 6px 12px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}
.entry-card:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
  color: var(--ink);
}
.entry-card-tag {
  grid-area: tag;
  font-size: 11px;
  color: var(--ink-3);
}
.entry-card strong {
  grid-area: title;
  font-size: 18px;
  font-weight: 600;
}
.entry-card em {
  grid-area: desc;
  font-style: normal;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.6;
}
.entry-card-go {
  grid-area: go;
  align-self: center;
  font-size: 12px;
  color: var(--brand);
  white-space: nowrap;
}
.entry-card-primary {
  border-color: var(--brand);
}
.entry-card-primary .entry-card-tag {
  color: var(--brand);
}
.entry-note {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 12px;
  color: var(--ink-2);
}
.entry-note strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 4px;
}
.entry-note p {
  margin: 0;
  line-height: 1.6;
}

/* login shell */
.login-view {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--ground);
}
.login-panel {
  width: min(920px, calc(100vw - 112px));
  margin: auto;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0,.85fr) minmax(0,1fr);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
}
.auth-aside {
  padding: 36px 32px;
  background: var(--raised);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.auth-brand {
  justify-content: flex-start;
  margin-bottom: 28px;
  font-size: 16px;
}
.auth-brand strong {
  font-weight: 600;
}
.auth-aside h1 {
  font-size: 24px;
  line-height: 1.3;
  margin: 0 0 10px;
  letter-spacing: -.015em;
}
.auth-aside .login-entry-hint {
  margin: 0 0 28px;
  text-align: left;
  max-width: none;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
}
.auth-facts {
  list-style: none;
  margin: auto 0 0;
  padding: 0;
  border-top: 1px solid var(--border);
}
.auth-facts li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 12px;
}
.auth-facts strong {
  font-weight: 500;
  color: var(--ink);
}
.auth-facts span {
  color: var(--ink-2);
}
.auth-main {
  padding: 36px 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 560px;
  min-width: 0;
}
.auth-main .login-form {
  width: 100%;
}

@media (max-width: 900px) {.entry-main {
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 32px 0;
}
.entry-intro h1 {
  font-size: 30px;
}
.entry-main {
  gap: 40px;
}
.login-panel {
  grid-template-columns: 1fr;
  width: min(480px, calc(100vw - 32px));
}
.auth-aside {
  padding: 24px;
  border-right: 0;
  border-bottom: 1px solid var(--border);
}
.auth-facts {
  display: block;
  margin-top: 18px;
}
.auth-facts li {
  grid-template-columns: 52px 1fr;
  gap: 6px 10px;
  padding: 9px 0;
  font-size: 12px;
}
.auth-facts .auth-fact-more {
  grid-column: 2 / -1;
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.auth-main {
  padding: 24px;
  min-height: 0;
}
}
@media (max-width: 640px) {.entry-shell {
  padding: 0 16px;
}
.entry-top {
  height: 56px;
}
.entry-top-links {
  display: none;
}
.entry-intro h1 {
  font-size: 24px;
}
.entry-facts li {
  grid-template-columns: 1fr;
  gap: 2px;
}
.entry-main {
  padding: 24px 0;
}
}
.menu-glyph { width:14px; height:10px; border-top:1.5px solid currentColor; border-bottom:1.5px solid currentColor; position:relative; display:block; }
.menu-glyph::after { content: ''; position:absolute; left:0; right:0; top:4px; height:1.5px; background:currentColor; }

/* ===== 交互反馈（第四十一轮）：仅保留 hover / press / focus，无页面级入场 ===== */
.primary, .ghost, .small-btn, .icon-btn {
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
}
.primary:active, .ghost:active, .small-btn:active, .icon-btn:active {
  transform: translateY(0) scale(.97);
}
.menu-item, .menu-parent {
  transition: background-color .15s ease, color .15s ease;
}
.menu-item .menu-icon, .menu-item .menu-label, .menu-parent .menu-label {
  transition: color .15s ease;
}
.stat-card, .runtime-tile, .user-summary-grid div {
  transition: border-color .15s ease, background-color .15s ease;
}

/* ===== 第四十一轮入口页增强：层级、编号、反馈动效 ===== */
.entry-eyebrow {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
}
.entry-intro h1 {
  font-size: clamp(31px, 3.1vw, 44px);
  line-height: 1.2;
  letter-spacing: -.02em;
  max-width: 13em;
  margin: 0 0 18px;
  text-wrap: balance;
}
.entry-facts { counter-reset: fact; }
.entry-facts li {
  grid-template-columns: 28px 104px minmax(0, 1fr);
  gap: 12px;
  counter-increment: fact;
}
.entry-facts li::before {
  content: "0" counter(fact); /* taste-skill-ignore: semantic step index */
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: .04em;
  color: var(--ink-3);
}
.entry-top-links a {
  position: relative;
  transition: color .15s ease;
}
.entry-top-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 1px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .18s ease;
}
.entry-top-links a:hover::after { transform: scaleX(1); }
.entry-card-go { transition: transform .16s ease; }
.entry-card:hover .entry-card-go { transform: translateX(3px); }

@media (max-width: 900px) {.entry-intro h1 { font-size: 30px; max-width: none; }
}
@media (max-width: 720px) {.entry-facts li { grid-template-columns: 1fr; }
.entry-facts li::before { display: none; }
}
@media (max-width: 480px) {.entry-intro h1 { font-size: 25px; }
.entry-eyebrow { font-size: 10px; }
}

/* ===== 第四十一轮视觉增强 v2：背景层次、入场动效、可点击态 ===== */
.entry-view, .login-view {
  background-color: var(--ground);
  background-image:
    linear-gradient(to right, rgba(15,26,36,0.013) 1px, transparent 1px), /* taste-skill-ignore: structural grid */
    linear-gradient(to bottom, rgba(15,26,36,0.013) 1px, transparent 1px); /* taste-skill-ignore: structural grid */
  background-size: 32px 32px;
  background-position: center top;
}
.entry-view::before, .login-view::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 900px 420px at 50% -8%, rgba(13,111,133,.09), transparent 70%); /* taste-skill-ignore: paper light */
}
.entry-view > *, .login-view > * { position: relative; z-index: 1; }
.entry-top { position: relative; }
.entry-top::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--brand);
}

@keyframes riseIn {
  from { opacity: 0; translate: 0 10px; }
  to { opacity: 1; translate: 0 0; }
}
.entry-eyebrow { animation: riseIn .42s cubic-bezier(.2,.7,.2,1) both; }
.entry-intro h1 { animation: riseIn .5s cubic-bezier(.2,.7,.2,1) .05s both; }
.entry-lead { animation: riseIn .5s cubic-bezier(.2,.7,.2,1) .1s both; }
.entry-facts { animation: riseIn .5s cubic-bezier(.2,.7,.2,1) .16s both; }
.entry-card {
  border-color: var(--control);
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.entry-card:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15,26,36,0.032); /* taste-skill-ignore: hover feedback */
}
.entry-card-primary { border-color: var(--brand); }
.entry-card-primary:hover { background: var(--brand-soft); }
.entry-card .entry-card-go { color: var(--brand); font-weight: 500; }
.entry-card:hover .entry-card-go { transform: translateX(4px); }
.primary:hover {
  box-shadow: 0 6px 16px rgba(13,111,133,.22); /* taste-skill-ignore: hover feedback */
}
.ghost:hover {
  box-shadow: 0 4px 12px rgba(15,26,36,0.024); /* taste-skill-ignore: hover feedback */
}
.panel, .stat-card, .toolbar {
  box-shadow: 0 1px 2px rgba(15,26,36,0.016); /* taste-skill-ignore: panel separation */
}
.modal-panel { box-shadow: 0 24px 64px rgba(15,26,36,0.072); }
 /* taste-skill-ignore: real dialog overlay */

@media (prefers-reduced-motion: reduce) {.entry-eyebrow, .entry-intro h1, .entry-lead, .entry-facts {
  animation: none !important;
}
}

/* 用户端与代理端背景（与入口页同一套网格） */
.agent-view {
  background-color: var(--ground);
  background-image:
    linear-gradient(to right, rgba(15,26,36,0.011) 1px, transparent 1px), /* taste-skill-ignore: structural grid */
    linear-gradient(to bottom, rgba(15,26,36,0.011) 1px, transparent 1px); /* taste-skill-ignore: structural grid */
  background-size: 32px 32px;
}

/* ===== 第四十二轮：列表可点击性 ===== */
.table-wrap { position: relative; }
tbody tr td { transition: background-color .12s ease, box-shadow .12s ease; }
tbody tr:hover td:first-child {
  box-shadow: inset 2px 0 0 var(--brand); /* taste-skill-ignore: row hover indicator */
}
tbody tr:active td {
  background: var(--active);
}
.small-btn {
  border-color: var(--control);
  background: var(--surface);
  color: var(--ink);
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
}
.small-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 2px 8px rgba(13,111,133,.12); /* taste-skill-ignore: hover feedback */
  transform: none;
}
.ghost.small-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}
.small-btn.primary, .small-btn.primary:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-accent);
}
.small-btn.primary:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}
.small-btn.danger-text:hover {
  border-color: var(--negative);
  color: var(--negative);
  background: var(--pill-negative-bg);
}
.link-btn {
  color: var(--brand);
  border-bottom: 1px solid transparent;
  transition: border-color .14s ease, color .14s ease;
}
.link-btn:hover {
  color: var(--brand-strong);
  border-bottom-color: currentColor;
}

/* ===== 第四十二轮：登录页深色品牌区 ===== */
.auth-aside {
  background-color: var(--brand-strong);
  background-image:
    linear-gradient(to right, rgba(15,26,36,0.033) 1px, transparent 1px), /* taste-skill-ignore: panel grid */
    linear-gradient(to bottom, rgba(15,26,36,0.033) 1px, transparent 1px), /* taste-skill-ignore: panel grid */
    linear-gradient(150deg, #eff7fa 0%, #e3f0f6 62%, #eaf4f8 100%); /* taste-skill-ignore: brand panel */
  background-size: 28px 28px, 28px 28px, auto;
  border-right: 0;
  color: var(--on-accent);
}
.auth-aside h1, .auth-aside .auth-brand strong { color: var(--on-accent); }
.auth-aside .login-entry-hint { color: rgba(15,26,36,0.100); }
.auth-aside .auth-facts { border-top-color: rgba(15,26,36,0.100); }
.auth-aside .auth-facts li { border-bottom-color: rgba(15,26,36,0.077); }
.auth-aside .auth-facts strong { color: var(--on-accent); }
.auth-aside .auth-facts span { color: rgba(15,26,36,0.100); }
.auth-aside .brand-mark { background: var(--surface); }
.auth-aside .brand-mark::before { border-color: var(--brand); }
.auth-aside .brand-mark::after { background: var(--brand); }

/* ==========================================================================
   第四十三轮：环境层（背景层次 + 低频动态）与可点击性升级
   目标：安静但有层次的浅色纸面；动效只做低频景深与反馈，不干扰阅读。
   ========================================================================== */

/* 1) 视图级环境层：静态网格 + 两团缓慢漂移的品牌光晕 */
body { background-color: var(--ground); }
.app-view, .agent-view { position: relative; background: transparent; }
.app-view::before, .agent-view::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--ground);
  background-image:
    linear-gradient(to right, rgba(15,26,36,0.012) 1px, transparent 1px), /* taste-skill-ignore: structural grid */
    linear-gradient(to bottom, rgba(15,26,36,0.012) 1px, transparent 1px); /* taste-skill-ignore: structural grid */
  background-size: 32px 32px;
  background-position: center top;
}
.app-view::after, .agent-view::after, .entry-view::after, .login-view::after {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(13,111,133,.14), transparent 72%) 16% 20% / 44vw 44vw no-repeat, /* taste-skill-ignore: ambient light */
    radial-gradient(closest-side, rgba(47,112,187,.10), transparent 72%) 84% 78% / 38vw 38vw no-repeat; /* taste-skill-ignore: ambient light */
  animation: ambientDrift 30s cubic-bezier(.45,.05,.55,.95) infinite alternate;
  will-change: transform;
}
@keyframes ambientDrift {
  0%   { transform: translate3d(-2.4%, -1.6%, 0) scale(1); }
  50%  { transform: translate3d(2.2%, 2.4%, 0) scale(1.08); }
  100% { transform: translate3d(-.6%, 1.4%, 0) scale(1.03); }
}

/* 环境层位于内容之下：给各视图的直接子元素建立高于环境层的层叠 */
.app-view > .app-main, .agent-view > .agent-hero, .agent-view > .agent-main { position: relative; z-index: 1; }
@media (min-width: 901px) {.app-view > .sidebar { position: relative; z-index: 1; }
}
.entry-view > *, .login-view > * { position: relative; z-index: 1; }

/* 侧栏让出底色，露出环境层；纸面（sheet）保持纯白 */
.sidebar { background: transparent; }

/* 纸面顶部一层极浅的品牌过渡，避免大面积纯白显得空 */
.sheet { position: relative; }
.sheet::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 200px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(13,111,133,.060) 0%, rgba(13,111,133,.018) 42%, rgba(13,111,133,0) 100%); /* taste-skill-ignore: ambient paper wash */
}
.sheet > * { position: relative; z-index: 1; }

/* 2) 可点击性：主按钮、次按钮、焦点环、导航选中、标签与链接 */
.primary {
  background-image: linear-gradient(180deg, var(--brand) 0%, var(--brand) 58%, var(--brand-strong) 100%); /* taste-skill-ignore: primary control depth */
  border-color: var(--brand);
  box-shadow: 0 1px 2px rgba(15,26,36,0.056), inset 0 1px 0 rgba(15,26,36,0.100); /* taste-skill-ignore: primary control depth */
}
.primary:hover {
  background-image: linear-gradient(180deg, var(--brand) 0%, var(--brand-strong) 58%, var(--brand-strong) 100%); /* taste-skill-ignore: hover feedback */
  border-color: var(--brand);
  box-shadow: 0 8px 20px rgba(13,111,133,.26), inset 0 1px 0 rgba(15,26,36,0.100); /* taste-skill-ignore: hover feedback */
}
.primary:active {
  transform: translateY(1px) scale(.985);
  box-shadow: 0 1px 2px rgba(15,26,36,0.072), inset 0 1px 3px rgba(15,26,36,0.088); /* taste-skill-ignore: press feedback */
}
.ghost:hover {
  border-color: var(--brand);
  color: var(--brand-strong);
  background: var(--brand-soft);
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(13,111,133,.18); /* taste-skill-ignore: focus halo */
}

/* 侧栏：选中项改为浅品牌底 + 左侧 3px 竖条，比底部细线更醒目 */
.menu-item, .menu-parent { transition: background-color .15s ease, color .15s ease, transform .15s ease; }
.menu-item:hover { transform: translateX(1px); }
.menu-item.active {
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 600;
}
.menu-item.active::after {
  left: 0;
  right: auto;
  top: 6px;
  bottom: 6px;
  width: 3px;
  height: auto;
  border-radius: 0 2px 2px 0;
  background: var(--brand);
}
.menu-item.active .menu-icon { color: var(--brand-strong); }

/* 标签页：悬停给底色，选中给品牌底 + 底部 2px */
.user-tabs button {
  transition: color .14s ease, background-color .14s ease, border-color .14s ease;
}
.user-tabs button:hover { background: var(--raised); color: var(--ink); }
.user-tabs button.active {
  background: var(--brand-soft);
  color: var(--brand-strong);
  border-bottom-color: var(--brand);
}
.tabs span { cursor: pointer; }
.tabs span:hover { color: var(--ink); }

/* 文字链接：常驻细下划线，悬停加深 */
.link-btn {
  text-decoration: underline;
  text-decoration-color: rgba(13,111,133,.38);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.link-btn:hover {
  text-decoration-color: currentColor;
  border-bottom-color: transparent;
}

/* 入口卡片：悬停时左侧品牌竖条展开 + 轻微上浮（已有 JS 契约不变） */
.entry-card { position: relative; overflow: hidden; }
.entry-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--brand);
  transform: scaleY(0);
  transform-origin: 50% 0;
  transition: transform .2s ease;
}
.entry-card:hover::before, .entry-card:focus-visible::before { transform: scaleY(1); }

/* 3) 页面级入场：只动 opacity / translate，不占用 transform，避免压掉悬停位移 */
@keyframes panelIn {
  from { opacity: 0; translate: 0 8px; }
  to   { opacity: 1; translate: 0 0; }
}
.page-body > * { animation: panelIn .32s cubic-bezier(.2,.7,.2,1) both; }
.page-body > *:nth-child(2) { animation-delay: .045s; }
.page-body > *:nth-child(3) { animation-delay: .09s; }
.page-body > *:nth-child(4) { animation-delay: .13s; }

/* 4) 仪表盘 KPI：等宽数字 + 0 值弱化 */
.stat-card strong {
  font-family: var(--font-mono); /* taste-skill-ignore: KPI literal data */
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.stat-card.is-zero, .stat-card.is-zero strong { color: var(--ink-3); }
.stat-card {
  transition: background-color .15s ease, border-color .15s ease;
}
.cards .stat-card:hover {
  border-color: var(--control);
  background: var(--surface-2);
}

/* 5) 减弱动态偏好 */
@media (prefers-reduced-motion: reduce) {.app-view::after, .agent-view::after, .entry-view::after, .login-view::after { animation: none !important; }
.page-body > * { animation: none !important; }
.menu-item:hover { transform: none; }
.entry-card::before { transition: none; }
}
/* 第四十三轮：运行态两栏按内容自适应，避免内容少的一栏留出整块空白 */
.two-col.runtime-overview { align-items: start; }
/* 纸面右上角的柔光：让大面积白色工作区也有呼吸感，内容层始终在其上 */
.sheet::after {
  content: "";
  position: absolute;
  top: -180px;
  right: -140px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(13,111,133,.11), rgba(13,111,133,0)); /* taste-skill-ignore: ambient sheet glow */
  animation: sheetGlow 26s ease-in-out infinite alternate;
}
@keyframes sheetGlow {
  from { opacity: .55; transform: scale(.94); }
  to   { opacity: 1;   transform: scale(1.07); }
}
@media (prefers-reduced-motion: reduce) {.sheet::after { animation: none; }
}
/* 移动端侧栏是覆盖层，必须保持不透明，避免透过侧栏看到页面内容 */
@media (max-width: 900px) {.sidebar { background: var(--ground); }
.app-view::after, .agent-view::after { opacity: .8; }
}
/* 图标按钮与账号按钮：悬停给出明确可点击反馈 */
.icon-btn:hover {
  background: var(--brand-soft);
  color: var(--brand-strong);
  border-color: transparent;
}
.account-btn:hover { color: var(--brand-strong); }
/* ===== 第四十四轮：本机配置面板字段改为上下结构，避免长标签把输入框挤出面板 ===== */
#nodeEnvGroups .filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2px 20px;
}
#nodeEnvGroups .filter-grid .env-field {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
}
#nodeEnvGroups .env-field > span:first-child { min-width: 0; }
#nodeEnvGroups .env-field code { overflow-wrap: anywhere; }
#nodeEnvGroups .env-desc { overflow-wrap: anywhere; }
#nodeEnvGroups .env-field input, #nodeEnvGroups .env-field select { width: 100%; min-width: 0; }
#nodeEnvGroups .env-field .switch-field { align-self: flex-start; }
/* 开关里的隐藏 checkbox 必须保持 1px：上面 `#nodeEnvGroups .env-field input { width:100% }
`
   的优先级高于 .switch-field input，会把离屏 checkbox 撑到整行宽度，
   在 position:absolute 下撑出 100+px 的横向滚动区（被 overflow-x:hidden 掩盖，移动端会误滚）。 */
#nodeEnvGroups .env-field .switch-field input {
  width: 1px;
  height: 1px;
  min-width: 0;
}

/* ===== 第四十四轮：宽表格的横向滚动可见性 ===== */
.table-wrap {
  scrollbar-width: thin;
  scrollbar-color: var(--control) transparent;
}
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.table-wrap::-webkit-scrollbar-thumb {
  background: var(--control);
  border-radius: 4px;
}
.table-wrap::-webkit-scrollbar-thumb:hover { background: var(--control-strong); }
/* ===== 第四十四轮：表头与标识列的可读性 ===== */
thead th {
  background: var(--raised);
  color: var(--ink-2);
  font-weight: 600;
}
td[data-label="卡密"], td[data-label="设备"], td[data-label="IP"], td[data-label="标识"], td[data-label="订单号"] {
  font-family: var(--font-mono); /* taste-skill-ignore: identifier column */
  font-size: 13px;
  letter-spacing: -.01em;
}
/* 移动端卡片模式的字段名保持正文无衬线，不跟随标识列等宽 */
.table-wrap td::before { font-family: var(--font-sans); }
/* ===== 第四十四轮：说明块统一为“注记”样式，和可编辑字段分层 ===== */
.billing-plan-note {
  border-left: 3px solid var(--brand); /* taste-skill-ignore: note marker */
  background: var(--surface-2);
  border-radius: 0 6px 6px 0;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.billing-plan-note > strong {
  font-size: 13px;
  font-weight: 600;
}
.billing-plan-note > p {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-2);
}
.billing-plan-note > p:first-child { margin-top: 0; }

/* 用户端 / 代理端登录：单列居中版式，避免宽面板顶部堆叠 */
.agent-main {
  padding: 34px 0 48px;
}
.agent-main:has(#agentLoginPanel:not(.hidden)) {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}
.agent-main:has(#agentLoginPanel:not(.hidden)) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding-top: 28px;
  padding-bottom: 28px;
}
.agent-panel {
  padding: 30px 30px 28px;
  border-radius: 14px;
}
.portal-login-head {
  display: grid;
  gap: 6px;
  margin-bottom: 22px;
}
.portal-login-eyebrow {
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.portal-login-head h1 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}
.portal-login-head p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.6;
}
.agent-panel .user-card-form {
  border: 0;
  background: transparent;
  padding: 0;
  gap: 16px;
}
.agent-panel .user-card-form label {
  gap: 8px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
}
.agent-panel .user-card-form input {
  height: 42px;
  border-color: var(--control);
  border-radius: 8px;
  font-size: 14px;
}
.agent-panel .captcha-box {
  height: 42px;
  border-color: var(--control);
  border-radius: 8px;
}
.agent-panel .user-submit {
  height: 44px;
  margin-top: 6px;
  border-radius: 8px;
  font-weight: 600;
}
@media (min-width: 1100px) {.portal-login-head p {
    max-width: 640px;
  }
}
@media (max-width: 1100px) and (min-width: 901px) {.auth-aside {
    padding: 30px 26px;
  }
.auth-main {
    padding: 28px 28px 26px;
    min-height: 520px;
  }
}
@media (max-width: 480px) {.agent-panel .captcha-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
.agent-panel .captcha-box {
    height: 44px;
    line-height: 42px;
  }
.agent-panel .captcha-box img {
    object-fit: contain;
    object-position: center;
    background: var(--surface);
  }
}
@media (max-width: 640px) {.agent-main {
    width: 100%;
    padding: 16px 12px 32px;
  }
.agent-panel {
    padding: 20px 16px 18px;
    border-radius: 12px;
  }
.agent-panel .user-card-form {
    gap: 14px;
  }
.portal-login-head {
    margin-bottom: 18px;
  }
.portal-login-head h1 {
    font-size: 20px;
  }
}

/* 页头品牌块垂直居中：修掉 `.user-brand` 继承旧头图 align-self:flex-start 造成的贴顶 */
.agent-hero .user-brand {
  align-self: center;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}
.agent-hero .user-brand > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}
.agent-hero .user-brand strong {
  line-height: 1.25;
}
.agent-hero .user-brand span {
  line-height: 1.25;
}
.agent-hero .user-admin-link {
  align-self: center;
  line-height: 1.2;
}

/* ===== 入口/登录：科技感层次（结构线、编号、品牌强调） ===== */
.entry-view {
  position: relative;
  overflow-x: hidden;
}
.entry-view::before {
  content: "";
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand) 22%, var(--brand) 78%, transparent);
  opacity: .22;
  pointer-events: none;
}
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  padding: 12px 0 0;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.entry-meta span {
  position: relative;
  padding-left: 13px;
}
.entry-meta span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  background: var(--brand);
  opacity: .55;
}
.entry-intro h1 em {
  font-style: normal;
  color: var(--brand-strong);
}
.entry-card {
  overflow: hidden;
}
.auth-meta {
  margin: 0 0 10px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
@media (max-width: 900px) {.entry-meta {
    gap: 6px 16px;
    font-size: 9.5px;
  }
}
@media (max-width: 480px) {.entry-meta span:nth-child(3) {
    display: none;
  }
}

/* 入口右侧：深色控制台面板，与登录页左侧同一材质 */

/* ==========================================================================
   第五十一轮：入口页 3D 场景 + 抽屉式入口卡 + 可读性修正
   设计约束：沿用 framed-sheet 浅色纸面；场景只做低对比空间结构，
   颜色预算仍集中在品牌色一处；不引入第三方库与内联脚本。
   ========================================================================== */
.entry-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: .95;
}
.entry-view > .entry-scene { position: absolute; z-index: 0; }
.entry-view .entry-shell { position: relative; z-index: 1; }

/* 入口页状态带：原 10px 全大写字距标签改为 12px 正常句式 */
.entry-meta {
  gap: 6px 22px;
  padding: 14px 0 0;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-2);
}
.entry-meta span {
  padding-left: 12px;
}
.entry-meta span::before {
  width: 4px;
  height: 4px;
  margin-top: -2px;
  border-radius: 50%;
  opacity: .7;
}
.entry-eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  color: var(--brand);
  margin-bottom: 12px;
}
.auth-meta {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-3);
}

/* 入口右侧：去掉"漂浮面板"重阴影，用底色 + 1px 边线分层 */

/* 抽屉式：说明与入口动作的展开反馈，卡片边界稳定不跳动 */

/* 深色面板上的边框：用面板同色系的实色浅一档描边，约 1.1–1.5:1，不做成"白框网格" */

@media (max-width: 900px) {.entry-scene { opacity: .6; }
}
@media (prefers-reduced-motion: reduce) {.entry-scene { display: none; }
}

/* 抽屉式细节行：悬停时从卡片底边滑出，不改变卡片外框尺寸 */

/* ===== 第五十一轮：总后台表格与侧栏可读性 ===== */
thead th {
  color: var(--ink);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: .01em;
}
td .cell-num {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  text-align: right;
}
td[data-label="积分"] .cell-num, td[data-label="积分变动"] .cell-num, td[data-label="数量"] .cell-num, td[data-label="金额"] .cell-num {
  min-width: 3.5em;
}
/* 菜单首字只做定位索引，不参与阅读：压小、压淡、定宽，避免和菜单文字抢视觉 */
.menu-icon {
  width: 14px;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  color: var(--ink-3);
  opacity: .72;
}
.menu-item:hover .menu-icon { opacity: .88; }
.menu-item.active .menu-icon { opacity: 1; }

/* 总后台概览：待处理队列为短列表，卡片收在自己的高度，避免空面板拉出大块留白 */
.two-col.runtime-overview > .panel { align-self: start; }
.two-col.runtime-overview .pending-grid { align-content: start; }

/* ==========================================================================
   第五十二轮：场景层推广到用户端 / 代理端 / 登录页
   约束：同一份 scene 脚本服务多个视图；画布只做低对比结构，不压表单与正文。
   ========================================================================== */
.agent-view, .login-view { position: relative; }
.agent-view > .scene-canvas, .login-view > .scene-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: .55;
}
/* 深色品牌区（登录页左侧）上场景需要更淡，避免吃掉白字 */
.login-view > .scene-canvas { opacity: .42; }

/* 场景层必须在内容之下：既有 z-index:1 内容层保持不变 */
.agent-view > .agent-hero, .agent-view > .agent-main, .login-view > main { z-index: 1; }

@media (max-width: 900px) {.agent-view > .scene-canvas, .login-view > .scene-canvas { opacity: .34; }
}
@media (prefers-reduced-motion: reduce) {.agent-view > .scene-canvas, .login-view > .scene-canvas { display: none; }
}

/* 登录/代理/用户三个入口面：主按钮改纯色填充（同一色系，不加渐变与投影），品牌区去掉彩色渐变
   说明：只作用于三个入口视图，后台内部按钮保持既有外观（已在前几轮评审通过）。 */
.login-view .primary, .agent-view .primary {
  background-image: none;
  background-color: var(--brand);
  border-color: var(--brand);
  box-shadow: none;
}
.login-view .primary:hover, .agent-view .primary:hover {
  background-image: none;
  background-color: var(--brand-strong);
  border-color: var(--brand);
  box-shadow: none;
}
.login-view .primary:active, .agent-view .primary:active {
  box-shadow: none;
}

/* 品牌深色面：彩色渐变改纯色，保留白色网格细线（作为可读性纹理，不是装饰渐变） */
.login-view .auth-aside {
  background-image:
    linear-gradient(to right, rgba(15,26,36,0.033) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,26,36,0.033) 1px, transparent 1px);
  background-size: 28px 28px, 28px 28px;
  background-color: var(--brand-strong);
}
/* 三个入口面的正文尺寸：把可读文本抬到 13px 档，只留标签与脚注在 12px */
.login-view .auth-facts li { font-size: 13px; }
.login-view .auth-facts .auth-fact-more { font-size: 12.5px; }
.login-view .auth-meta { font-size: 12px; }
/* 用户端 / 代理端登录头的小标签：11px 大写加宽是模板腔，改成 12px 常规字距 */
.portal-login-eyebrow {
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: none;
  font-weight: 500;
}
/* 登录页事实清单：抽屉式细节行（悬停/聚焦展开，不改左侧栏高度） */
/* 起始态隐藏，只在允许动效且为桌面宽度时启用；reduced-motion 与移动端不渲染细节行 */
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  /* 详细介绍默认可见：正文信息不应依赖鼠标悬停才能发现，hover 只做强调。 */
.auth-aside .auth-facts li {
    align-items: start;
  }
.auth-aside .auth-fact-more {
    grid-column: 2 / -1;
    display: block;
    max-height: none;
    overflow: visible;
    margin-top: 3px;
    opacity: .72;
    transform: none;
    font-size: 11.5px;
    line-height: 1.65;
    color: var(--ink-2);
    transition: opacity .2s ease, color .2s ease;
  }
.auth-aside .auth-facts li:hover .auth-fact-more, .auth-aside .auth-facts li:focus-within .auth-fact-more {
    opacity: 1;
    color: var(--ink);
  }
}
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  /* 详细介绍是正文信息，不再隐藏：窄屏与减少动效场景直接静态展示，避免用户看不到内容。 */
.auth-aside .auth-facts .auth-fact-more {
    display: block;
    max-height: none;
    overflow: visible;
    opacity: 1;
    transform: none;
  }
}
/* ==========================================================================
   第五十三轮：总后台列表页密度
   1) 只放刷新按钮的工具条会撑出 50px 空横条 —— 改成面板内的浮动刷新按钮。
   2) 操作列按钮在桌面宽度被挤到换行，行高从 45px 涨到 83px —— 收紧按钮与间距。
   ========================================================================== */
.panel-has-refresh { position: relative; }
.panel-has-refresh > .panel-refresh {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 28px;
  height: 28px;
  min-height: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1;
  z-index: 2;
}
/* 面板右上角已有刷新按钮时，第一行的筛选网格给它让出位置 */
.panel-has-refresh > .filter-grid { padding-right: 44px; }
.panel-has-refresh > .filter-grid .filter-actions { padding-right: 0; }
@media (max-width: 640px) {.panel-has-refresh > .filter-grid { padding-right: 0; }
.panel-has-refresh > .panel-refresh { position: static; margin: 0 0 10px auto; display: block; }
}

/* 表格操作列：桌面端不换行，按钮保持单行排布，行高回到普通密度 */
@media (min-width: 901px) {.table-wrap td[data-label="操作"] .actions {
    flex-wrap: nowrap;
    gap: 5px;
  }
.table-wrap td[data-label="操作"] .small-btn, .table-wrap td[data-label="操作"] .actions .primary, .table-wrap td[data-label="操作"] .actions .ghost {
    padding: 4px 9px;
    min-height: 0;
    height: 28px;
    font-size: 12px;
    white-space: nowrap;
    flex: 0 0 auto;
  }
  /* 操作列宽度按内容收缩，把剩余宽度让给数据列 */
.table-wrap th:last-child, .table-wrap td[data-label="操作"] { width: 1%; white-space: nowrap; }
}
/* ===== 第五十四轮：可点击性（点击热区补到 32px） ===== */
/* 品牌标识本身就是首页链接，实测高度只有 28px，同样补到 32px。 */
.login-brand, .entry-brand {
  min-height: 32px;
  align-items: center;
}
/* 问题：页脚导航与登录页次要链接的实测点击高度只有 19–28px（低于 32px 可用基线），
   但脚本没有可用的父级内边距可撑开，因此直接在链接/按钮自身补纵向内边距。
   只加纵向，水平内边距保持 0，避免改变现有横向对齐与间距。 */
.login-footer-links a, .entry-top-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 0;
}
.login-footer-links a {
  line-height: 1.4;
}
.link-btn {
  min-height: 32px;
  padding: 6px 0;
  line-height: 1.4;
}
/* 入口页脚与登录页脚都是垂直排列的块，链接变高后收紧容器外边距以保持原有视觉密度 */
.login-footer-links {
  margin-bottom: 4px;
}
@media (max-width: 640px) {
  /* 触摸设备再高一点，避免相邻链接误触 */
.login-footer-links a, .entry-top-links a, .link-btn {
    min-height: 36px;
    padding: 8px 0;
  }
.login-footer-links {
    gap: 4px 20px;
  }
}

/* 移动端验证码图：原图 180x54（10:3）。宽高被同时拉满会让验证码字符横向拉伸变形，
   这里改为按原比例渲染：容器最多 132px 宽，图片 contain 居中，不再占满整行。 */
@media (max-width: 480px) {.captcha-row, .user-captcha-row {
    grid-template-columns: minmax(0, 1fr) 132px;
    align-items: start;
  }
.captcha-box, .agent-panel .captcha-box {
    width: 132px;
    height: 40px;
    line-height: 38px;
  }
.captcha-box img, .agent-panel .captcha-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }
}
/* ==========================================================================
   第五十六轮：移动端手感（依据 docs/design-skills/emil-motion/mobile-native）
   1) 去掉系统点击蓝/灰高亮，改用自家 :active 按压反馈（否则触摸无反馈）
   2) 触摸设备上不保留 hover 位移与抽屉展开，避免点一下卡住不还原
   3) 粗指针（手指）下输入框至少 16px，避免 iOS 聚焦自动放大页面
   4) 应用外壳用 dvh 跟随地址栏，保留 vh 回退（旧内核不受影响）
   5) 页面级禁用双击缩放等待与长按选字，滚动容器不把滚动链传给页面
   只在触摸/动态视口能力成立时生效，桌面端视觉与尺寸不变。
   ========================================================================== */
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
button, a, [role="button"], summary, label[for] {
  touch-action: manipulation;
}
button, [role="button"], .menu-item, .menu-parent, .user-tabs button, .tabs span {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
/* 按压反馈：手指落下即变，不等 click（touch 上没有 hover 可依赖） */
.entry-card:active {
  background: var(--brand-soft);
}
.login-footer-links a:active, .entry-top-links a:active, .link-btn:active {
  opacity: .72;
}
/* 触摸设备：不保留 hover 位移，也不把抽屉细节行留在展开态 */
@media (hover: none) {.primary:hover, .ghost:hover, .small-btn:hover, .icon-btn:hover, .entry-card:hover, .stat-card:hover, .runtime-tile:hover, .sdk-downloads a:hover, .user-admin-link:hover {
    transform: none;
  }
.auth-aside .auth-facts li:hover .auth-fact-more {
    opacity: 1;
  }
}
/* 粗指针：输入框字号下限 16px，iOS 才不会聚焦放大（不靠 maximum-scale 禁用缩放） */
@media (pointer: coarse) {input:not([type="checkbox"]):not([type="radio"]), select, textarea, .user-card-form input, .agent-generate-form input, .agent-panel .user-card-form input, .field input, .label input, .login-form .field input {
    font-size: 16px;
  }
}
/* 动态视口：应用外壳跟随地址栏收缩，避免底部按钮被浏览器工具栏盖住 */
@supports (height: 100dvh) {.app-view, .sidebar, .app-main {
    height: 100dvh;
  }
.modal-panel {
    max-height: calc(100dvh - 48px);
  }
.agent-main:has(#agentLoginPanel:not(.hidden)) {
    min-height: calc(100dvh - 80px);
  }
}
/* 内部滚动容器到达边界后不把滚动链传给页面（页面自身仍可下拉刷新） */
.content, .sidebar, .table-wrap, .modal-panel {
  overscroll-behavior: contain;
}
@media (max-width: 900px) {.toast {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
}

/* ==========================================================================
   第五十七轮：深空控制台（Deep-Space Console）视觉层
   依据：
   - docs/design-skills/ai-design-skills/skills/futuristic/tech-futurism.md
   - docs/design-skills/ai-design-skills/skills/depth-texture/glassmorphism.md
   - docs/design-skills/taste-skill/references/colour.md（单色相预算、无彩虹渐变）
   - docs/design-skills/taste-skill/references/motion.md（只做功能性动效）
   原则：
   1) 大面积不用高饱和实色填充，只做深玻璃 + 1px 描边 + 局部发光；
   2) 发光只出现在可交互/聚焦/在线三类元素上，不做装饰性光球；
   3) 全部动效在 prefers-reduced-motion 下退化为静态。
   ========================================================================== */
html, body {
  background: var(--ground);
  color: var(--ink);
}

/* 全局氛围层：细网格 + 两处极低亮度极光，固定不随滚动，不抢焦点 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--hairline) 1px, transparent 1px),
    linear-gradient(to bottom, var(--hairline) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  opacity: .62;
  mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 20%, transparent 78%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 760px 440px at 6% -8%, rgba(13,111,133,.055), transparent 62%),
    radial-gradient(ellipse 680px 400px at 98% 2%, rgba(47,107,216,.035), transparent 60%);
}
#entryView, #userView, #agentView, #loginView, #appView { position: relative; z-index: 1; }
::selection { background: rgba(13,111,133,.28); color: var(--ink); }

/* 焦点环：统一青色光晕，替代浏览器默认蓝框 */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-control);
}

/* 滚动条：细、暗、hover 提亮 */
.content, .sidebar, .table-wrap, .modal-panel, .side-menu, .user-center-body {
  scrollbar-width: thin;
  scrollbar-color: var(--control) transparent;
}
.content::-webkit-scrollbar, .sidebar::-webkit-scrollbar, .table-wrap::-webkit-scrollbar, .modal-panel::-webkit-scrollbar { width: 8px; height: 8px; }
.content::-webkit-scrollbar-track, .sidebar::-webkit-scrollbar-track, .table-wrap::-webkit-scrollbar-track, .modal-panel::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb, .sidebar::-webkit-scrollbar-thumb, .table-wrap::-webkit-scrollbar-thumb, .modal-panel::-webkit-scrollbar-thumb {
  background: var(--control);
  border-radius: 999px;
}
.content::-webkit-scrollbar-thumb:hover, .table-wrap::-webkit-scrollbar-thumb:hover, .sidebar::-webkit-scrollbar-thumb:hover { background: var(--control-strong); }

/* ---------- 1. 公开面：入口 / 登录 / 代理 / 用户 ---------- */
.entry-view, .login-view, .agent-view {
  background-color: transparent;
  background-image: none;
}
.entry-view::before, .login-view::before {
  background: radial-gradient(ellipse 900px 420px at 50% -8%, rgba(13,111,133,.10), transparent 70%);
}
/* 顶部品牌细线：两端淡出，不再整条实色 */
.entry-top::before {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand) 30%, var(--brand) 70%, transparent);
  opacity: .5;
}
.entry-brand strong, .login-brand strong, .user-brand strong {
  color: var(--ink);
  letter-spacing: -.01em;
}
.brand-mark {
  background: linear-gradient(150deg, #e8f2f7 0%, #e2eef5 100%);
  border: 1px solid rgba(13,111,133,.42);
  box-shadow: 0 0 18px rgba(13,111,133,.20), inset 0 0 10px rgba(13,111,133,.16);
}
.brand-mark::before, .brand-mark::after { background: var(--brand); border-color: transparent; }
.entry-meta { color: var(--ink-3); }
.entry-meta span::before { background: var(--brand); opacity: .8; box-shadow: 0 0 6px rgba(13,111,133,.6); }
.entry-eyebrow { color: var(--brand); opacity: .92; }
.entry-intro h1 { color: var(--ink); }
.entry-intro h1 em { color: var(--brand); }
.entry-lead { color: var(--ink-2); }
.entry-facts li { border-top-color: var(--rule); }
.entry-facts strong { color: var(--ink); }
.entry-facts span { color: var(--ink-2); }
.entry-facts li::before, .entry-facts > li > span:first-child { color: var(--brand); }

/* 入口右面板：深玻璃，不再整块高饱和青 */

/* 登录页左品牌面板：深玻璃 + 青色扫描线 */
.auth-aside, .login-view .auth-aside {
  background-color: #eef5f9;
  background-image:
    radial-gradient(ellipse 420px 260px at 12% 0%, rgba(13,111,133,.16), transparent 62%),
    linear-gradient(to right, rgba(15,26,36,0.014) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,26,36,0.014) 1px, transparent 1px);
  background-size: auto, 26px 26px, 26px 26px;
  border-right: 1px solid var(--glass-line);
  color: var(--ink);
}
.auth-aside::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(13,111,133,.10) 48%, transparent 52%, transparent 100%);
  opacity: .5;
  animation: asideScan 9s linear infinite;
}
@keyframes asideScan {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}
.auth-aside h1, .auth-aside .auth-brand strong { color: var(--ink); }
.auth-aside .login-entry-hint { color: var(--ink-2); }
.auth-aside .auth-facts { border-top-color: rgba(15,26,36,0.044); }
.auth-aside .auth-facts li { border-bottom-color: rgba(15,26,36,0.044); }
.auth-aside .auth-facts strong { color: var(--ink); }
.auth-aside .auth-facts span { color: var(--ink-2); }
.auth-aside .auth-fact-more { color: var(--ink-2); }
.auth-aside .auth-facts li:hover strong { color: var(--brand); }

/* 表单与输入：暗底 + 内描边，focus 触发青色光晕 */
input, select, textarea, .field input, .field select, .field textarea, .label input, .label select, .login-form .field input, .login-form .recovery-field textarea, .user-card-form input, .agent-generate-form input {
  background: var(--surface-2);
  border: 1px solid var(--control);
  color: var(--ink);
  caret-color: var(--brand);
}
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: var(--control-strong); }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: var(--glow-focus), 0 0 20px rgba(13,111,133,.14);
  background: var(--surface-3);
}
select option { background: var(--surface-2); color: var(--ink); }

/* 主按钮：纯色青 + 深色字 + 内高光；hover 只加光不外扩位移 */
.primary, .small-btn.primary {
  background: var(--brand);
  border: 1px solid var(--brand);
  color: var(--on-accent);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(15,26,36,0.100), 0 0 0 0 rgba(13,111,133,0);
}
.primary:hover, .small-btn.primary:hover {
  background: #0a5c70;
  border-color: #0a5c70;
  color: var(--on-accent);
  box-shadow: inset 0 1px 0 rgba(15,26,36,0.100), 0 0 22px rgba(13,111,133,.32);
  transform: none;
}
.primary:active { transform: translateY(1px); box-shadow: inset 0 1px 4px rgba(15,26,36,0.096); }
.ghost {
  background: var(--surface-2);
  border-color: var(--control);
  color: var(--ink);
}
.ghost:hover { background: var(--surface-3); border-color: var(--brand); color: var(--ink); transform: none; }
.small-btn {
  background: var(--surface-2);
  border-color: var(--control);
  color: var(--ink);
}
.small-btn:hover { border-color: var(--brand); background: var(--surface-3); }
.icon-btn { color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-3); border-color: var(--control); color: var(--ink); transform: none; }
.link-btn { color: var(--brand); }
.link-btn:hover { color: #0a5c70; }
.tabs { border-bottom-color: var(--rule); }
.tabs span { color: var(--ink-3); }
.tabs span.active {
  color: var(--ink);
  border-bottom-color: var(--brand);
  box-shadow: 0 1px 0 0 var(--brand), 0 6px 16px -8px rgba(13,111,133,.6);
}
.captcha-box {
  background: var(--surface-2);
  border-color: var(--control);
}
.captcha-box:hover { border-color: var(--brand); }
.login-footer, .login-footer p { color: var(--ink-3); }
.login-footer-links a { color: var(--ink-2); }
.login-footer-links a:hover { color: var(--brand); }
.node { box-shadow: 0 0 26px rgba(13,111,133,.45); }

/* ---------- 2. 后台壳层：侧栏 / 顶栏 / 纸面 ---------- */
.sidebar {
  background: linear-gradient(180deg, #f2f7fb 0%, #eaf1f7 100%);
  border-right: 1px solid var(--rule);
  color: var(--ink-2);
}
.side-brand { color: var(--ink); border-bottom: 1px solid var(--rule); }
.side-brand strong { color: var(--ink); letter-spacing: -.01em; }
.side-foot { color: var(--ink-3); }
.menu-item, .menu-parent { color: var(--ink-2); }
.menu-item:hover, .menu-parent:hover { background: var(--surface-2); color: var(--ink); }
.menu-item.active {
  background: linear-gradient(90deg, rgba(13,111,133,.16) 0%, rgba(13,111,133,.03) 100%);
  color: var(--ink);
}
.menu-item.active::after { background: var(--brand); box-shadow: 0 0 10px rgba(13,111,133,.7); }
.menu-item.active .menu-icon { color: var(--brand-strong); }
.submenu { background: var(--surface); border-color: var(--rule); }
.topbar {
  background: rgba(255,255,255,.86);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.account-btn, .account { color: var(--ink); }
.avatar {
  background: linear-gradient(150deg, #e8f2f7, #e2eef5);
  border: 1px solid rgba(13,111,133,.45);
  box-shadow: 0 0 12px rgba(13,111,133,.24);
}
.sheet { background: transparent; }
.sheet::before {
  background: linear-gradient(180deg, rgba(13,111,133,.055) 0%, rgba(13,111,133,.012) 42%, transparent 100%);
}
.page-head {
  background: transparent;
  border-bottom: 1px solid var(--rule);
}
.breadcrumb { color: var(--ink-3); }
.breadcrumb a { color: var(--ink-2); }
#pageTitle, .page-head h1 { color: var(--ink); letter-spacing: -.02em; }
.content { background: transparent; }

/* ---------- 3. 面板 / 表格 / 表单块 ---------- */
.panel, .stat-card, .runtime-tile, .runtime-row, .toolbar, .agent-panel, .agent-center, .billing-plan-card, .sdk-test-panel, .backup-panel, .account-security, .agent-settlement-card, .workflow-summary, .operation-summary {
  background: var(--glass-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: inset 0 1px 0 rgba(15,26,36,0.100);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ink-2);
}
.panel:hover, .stat-card:hover, .runtime-tile:hover {
  border-color: var(--border-strong);
  box-shadow: inset 0 1px 0 rgba(15,26,36,0.100), 0 0 24px rgba(13,111,133,.07);
}
.stat-card strong, .runtime-tile strong, .runtime-row strong { color: var(--ink); }
.mini-stats span, .stat-card span { color: var(--ink-2); }
.panel h2, .panel h3, .section-heading, .workflow-summary strong { color: var(--ink); }
.form-hint, .billing-plan-note, .agent-rule-note, .muted { color: var(--ink-2); }
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
th, td { border-right-color: var(--rule); border-bottom-color: var(--rule); color: var(--ink-2); }
th { background: var(--surface-2); color: var(--ink); letter-spacing: .02em; }
tbody tr:nth-child(even) td { background: rgba(15,26,36,0.008); }
tbody tr:hover td { background: rgba(13,111,133,.055); }
tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--brand); }
td a, .table-wrap td a { color: var(--brand); }
td a:hover { color: #0a5c70; }
.tag {
  background: rgba(13,111,133,.14);
  color: var(--brand);
  border: 1px solid rgba(13,111,133,.28);
}
.tag.is-success, .tag.is-ok { background: var(--pill-positive-bg); color: var(--pill-positive-ink); border-color: var(--border-positive); }
.tag.is-danger, .tag.is-bad { background: var(--pill-negative-bg); color: var(--pill-negative-ink); border-color: var(--border-negative); }
.status, .activity-status { color: var(--ink-2); }
.pagination-bar { background: var(--surface-2); border-color: var(--border); color: var(--ink-2); }
.page-jump input { background: var(--surface-2); border-color: var(--control); color: var(--ink); }

/* 状态块：靠左边框 + 浅色底表达语义，不使用满屏色块 */
.agent-cost-preview, .activity-badge, .backup-source, .data-health-summary div, .backup-risk-grid div, .runtime-data-health, .runtime-registration, .ip-waf-guidance div, .agent-settlement-guide div, .agent-balance-strip, .notice, .sdk-usage-note, .sdk-ready-grid div, .sdk-checklist div, .sdk-resource-row, .billing-plan-switch-summary, .billing-plan-quota-summary div, .billing-plan-tier-summary span, .billing-tier-row, .billing-tier-editor, .billing-tier-empty, .billing-plan-switch-grid div, .agent-price-config, .agent-settlement-guide div, .ip-waf-guidance div, .env-group, .env-field code, .env-badge, .env-desc {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--ink-2);
}
.agent-cost-preview.is-bad, .activity-badge.is-bad, .backup-risk-grid div.is-bad, .data-health-summary div.is-bad, .runtime-registration.is-bad, .operation-summary.is-danger, .backup-delete-warning { background: var(--tint-negative); border-color: var(--border-negative); color: var(--pill-negative-ink); }
.activity-badge.is-ok, .backup-risk-grid div.is-ok, .data-health-summary div.is-ok, .runtime-data-health.is-ok, .backup-source.is-manual { background: var(--tint-positive); border-color: var(--border-positive); color: var(--pill-positive-ink); }
.activity-badge.is-warn, .backup-risk-grid div.is-warn, .data-health-summary div.is-warn, .runtime-data-health.is-warn, .backup-source.is-warn, .data-health-warning, .backup-restore-warning { background: var(--tint-warning); border-color: var(--border-warning); color: var(--pill-warning-ink); }
.backup-source.is-auto { background: var(--tint-info); border-color: var(--border-info); color: var(--info); }
.activity-badge.is-muted { background: var(--surface-2); border-color: var(--border); color: var(--ink-3); }
.danger-text { color: var(--negative); }
.danger-text:hover { color: #a12d21; }

/* 弹窗与提示：深玻璃 + 顶部高光 */
.modal { background: rgba(15,26,36,.34); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal-panel {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: 0 32px 80px rgba(15,26,36,0.288), 0 0 0 1px rgba(13,111,133,.10), inset 0 1px 0 rgba(15,26,36,0.100);
  border-radius: var(--radius-sheet);
}
.modal-panel header { border-bottom: 1px solid var(--rule); }
.modal-panel h2 { color: var(--ink); }
.toast {
  background: var(--surface-3);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  box-shadow: 0 18px 44px rgba(15,26,36,0.240), 0 0 0 1px rgba(13,111,133,.12);
}
.doc-code, .wide-textarea, .agent-generated-box textarea {
  background: var(--code-bg);
  color: var(--code-ink);
  border-color: var(--border);
}
.loading { color: var(--ink-2); }
.empty { color: var(--ink-3); }
.empty::before { color: var(--control-strong); }

/* 开关在深底上的可辨识度 */
.switch-field i { background: var(--control); }
.switch-field i::after { background: var(--ink); }
.switch-field:has(input:checked) i { background: rgba(13,111,133,.22); border-color: var(--brand); }
.switch-field:has(input:checked) i::after { background: var(--brand); box-shadow: 0 0 10px rgba(13,111,133,.6); }

/* 验证码图片在深底上压暗，避免刺眼白块 */
.captcha-box img, .agent-panel .captcha-box img {
  background: var(--surface-3);
  border-radius: 4px;
}

/* ---------- 4. 动效：只做功能性进入与状态反馈 ---------- */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-body > * { animation: fadeUp .34s cubic-bezier(.22,.68,.18,1) both; }
.page-body > *:nth-child(2) { animation-delay: .04s; }
.page-body > *:nth-child(3) { animation-delay: .08s; }
.page-body > *:nth-child(4) { animation-delay: .12s; }

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61,220,151,.55); }
  70%      { box-shadow: 0 0 0 8px rgba(61,220,151,0); }
}
.avatar { animation: pulseDot 3.4s ease-out infinite; }

@media (prefers-reduced-motion: reduce) {.auth-aside::after, .page-body > *, .avatar { animation: none !important; }
}

/* ---------- 5. 旧轮次覆盖点的收口（必须放在最后，保证深色主题生效） ---------- */

/* 第五十二轮把登录页左栏写成了整块 --brand-strong 实色，这里改回深玻璃 */
.login-view .auth-aside {
  background-color: #eef5f9;
  background-image:
    radial-gradient(ellipse 420px 260px at 12% 0%, rgba(13,111,133,.16), transparent 62%),
    linear-gradient(to right, rgba(15,26,36,0.014) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,26,36,0.014) 1px, transparent 1px);
  background-size: auto, 26px 26px, 26px 26px;
  border-right: 1px solid var(--glass-line);
  color: var(--ink);
}
.login-view .primary, .agent-view .primary {
  background-image: none;
  background-color: var(--brand);
  border-color: var(--brand);
  color: var(--on-accent);
  box-shadow: inset 0 1px 0 rgba(15,26,36,0.100);
}
.login-view .primary:hover, .agent-view .primary:hover {
  background-image: none;
  background-color: #0a5c70;
  border-color: #0a5c70;
  color: var(--on-accent);
  box-shadow: inset 0 1px 0 rgba(15,26,36,0.100), 0 0 22px rgba(13,111,133,.32);
}
/* 第五十三轮之前的浅色面板阴影在深底上会发灰，统一换成边框 */
.panel, .stat-card, .toolbar, .runtime-tile, .table-wrap {
  box-shadow: inset 0 1px 0 rgba(15,26,36,0.100);
}
/* 深底上旧的高亮色块（浅蓝/浅绿/浅黄底）全部走语义浅色令牌，避免大片白底 */
.agent-price-grid label, .form-row label, .user-card-form label, .agent-generate-form label, .filter-grid .label {
  color: var(--ink-2);
}
.sdk-downloads a, .sdk-downloads a:hover {
  background: var(--tint-info);
  border-color: var(--border-info);
  color: var(--info);
}
.sdk-downloads strong { color: var(--ink); }
.billing-plan-card { background: var(--glass-1); border-color: var(--border); }
tr:nth-child(even) td { background: rgba(15,26,36,0.008); }
.table-wrap tr { background: transparent; }
.agent-settlement-timeline span, .billing-plan-tier-summary span {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--ink-2);
}
.agent-settlement-timeline span.is-current, .billing-plan-tier-summary span.is-current {
  background: rgba(13,111,133,.15);
  border-color: rgba(13,111,133,.45);
  color: var(--brand);
}
.image-remove-button { background: var(--tint-negative); border-color: var(--border-negative); color: var(--negative); }
.image-remove-button:hover { background: rgba(255,123,114,.20); border-color: var(--negative); }
.env-field code, .env-masked, .env-badge { background: var(--surface-3); color: var(--ink-2); }
.env-badge.ok { background: var(--tint-positive); color: var(--pill-positive-ink); border-color: var(--border-positive); }
.env-badge.global { background: var(--tint-warning); color: var(--pill-warning-ink); border-color: var(--border-warning); }
.settlement-image-grid img { background: var(--surface-3); border-color: var(--border); }
.workflow-reward { background: var(--surface-2); border-color: var(--border); }

/* 用户端 / 代理端顶栏：浅色底遗留的白块与蓝线全部改为深色玻璃 */
.agent-hero {
  background: transparent;
  border-bottom: 1px solid var(--rule);
}
.agent-hero::after { display: none; }
.user-admin-link {
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--control);
  border-radius: var(--radius-control);
}
.user-admin-link:hover {
  color: var(--brand);
  background: var(--surface-3);
  border-color: var(--brand);
  transform: none;
}
.node { background: rgba(13,111,133,.30); }
.node::after { background: var(--brand); box-shadow: 0 0 10px rgba(13,111,133,.55); }
.agent-view .user-brand strong { color: var(--ink); }
.agent-view .user-brand span { color: var(--ink-2); }
.portal-login-head h1 { color: var(--ink); }
.portal-login-head p { color: var(--ink-2); }
.user-tabs { background: var(--surface-2); border-color: var(--border); }
.user-tabs button { background: transparent; border-color: var(--border); color: var(--ink-2); }
.user-tabs button.active { background: var(--brand); border-color: var(--brand); color: var(--on-accent); }
.user-center-head strong { color: var(--ink); }
.user-center-head span { color: var(--ink-2); }
.user-card-form label, .agent-generate-form label { color: var(--ink-2); }
.user-msg { color: var(--ink-2); }

/* ---------- 6. 指针聚光（--mx/--my 由 entry-scene.js 写入） ---------- */
.entry-card, .panel, .stat-card, .runtime-tile, .agent-panel, .modal-panel { position: relative; }
.entry-card::after, .panel::after, .stat-card::after, .runtime-tile::after, .agent-panel::after, .modal-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .22s ease;
  background: radial-gradient(260px circle at var(--mx, -999px) var(--my, -999px), rgba(13,111,133,.13), transparent 62%);
}
.entry-card:hover::after, .panel:hover::after, .stat-card:hover::after, .runtime-tile:hover::after, .agent-panel:hover::after, .modal-panel:hover::after { opacity: 1; }
/* 入口卡原本用 ::after 画底部推进线，两者不能共存：入口卡改用 ::before 之外的描边光 */
@media (hover: none), (prefers-reduced-motion: reduce) {.entry-card::after, .panel::after, .stat-card::after, .runtime-tile::after, .agent-panel::after, .modal-panel::after { display: none; }
}
/* 卡片倾斜：已有 --tilt-x/--tilt-y 变量，深色主题下加一点高光跟随 */
.entry-card { transform-style: preserve-3d; }

/* ---------- 7. 入口：进场层（只有品牌与进入） ---------- */
.entry-view {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  overflow: hidden;
  background: var(--ground);
}
.entry-view > .entry-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}
body.entry-open { overflow: hidden; }

/* 进场层：一屏只有品牌 + 一个按钮 */
.entry-gate {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(ellipse 760px 460px at 50% 46%, rgba(13,111,133,.13), transparent 66%),
    radial-gradient(ellipse 1200px 760px at 50% 118%, rgba(214,229,240,.85), transparent 72%),
    var(--ground);
  transition: opacity .55s ease, transform .55s cubic-bezier(.22,.68,.18,1), visibility .55s;
}
.entry-gate[hidden] { display: none; }
.entry-gate[data-done="1"] {
  opacity: 0;
  transform: scale(1.03);
  visibility: hidden;
  pointer-events: none;
}
.entry-gate-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  animation: gateIn 1s cubic-bezier(.22,.68,.18,1) both;
}
@keyframes gateIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.entry-gate-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin-bottom: 6px;
  box-shadow: 0 0 42px rgba(13,111,133,.30);
}
.entry-gate-brand {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--ink);
}
.entry-gate-sub {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.entry-gate-btn {
  position: relative;
  overflow: hidden;
  margin-top: 30px;
  min-width: 196px;
  padding: 15px 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid rgba(13,111,133,.55);
  border-radius: 999px;
  background: rgba(13,111,133,.06);
  color: var(--ink);
  font-size: 15px;
  letter-spacing: .18em;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, letter-spacing .2s ease;
}
.entry-gate-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 32%, rgba(13,111,133,.30) 50%, transparent 68%);
  transform: translateX(-120%);
  animation: gateSweep 3.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes gateSweep {
  0%, 64% { transform: translateX(-120%); }
  100%    { transform: translateX(120%); }
}
.entry-gate-btn span, .entry-gate-btn em { position: relative; z-index: 1; }
.entry-gate-btn em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .24em;
  color: rgba(13,111,133,.82);
}
.entry-gate-btn:hover, .entry-gate-btn:focus-visible {
  background: rgba(13,111,133,.14);
  border-color: var(--brand);
  box-shadow: 0 0 0 1px rgba(13,111,133,.22), 0 0 36px rgba(13,111,133,.26);
  letter-spacing: .26em;
}
.entry-gate-foot {
  position: absolute;
  left: 0; right: 0; bottom: 72px;
  margin: 0;
  text-align: center;
  font-size: 11.5px;
  letter-spacing: .12em;
  color: var(--ink-3);
}
.entry-gate-copy {
  position: absolute;
  left: 0; right: 0; bottom: 30px;
  margin: 0;
  text-align: center;
  font-size: 11px;
  color: var(--ink-3);
}

/* ---------- 7b. 进入后：整屏等距地图 ---------- */
.entry-content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease .16s, visibility .5s .16s;
}
.entry-content[data-open="1"] { opacity: 1; visibility: visible; }
.entry-top {
  flex: 0 0 auto;
  height: 62px;
  padding: 0 clamp(16px, 3vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--rule);
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.entry-top-right {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
}
.entry-top-links { display: flex; align-items: center; gap: 18px; }
.entry-top-links a {
  font-size: 12.5px;
  color: var(--ink-2);
  text-decoration: none;
  transition: color .16s ease;
}
.entry-top-links a:hover, .entry-top-links a:focus-visible { color: var(--brand); }
.entry-exit {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255,255,255,.86);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease, background-color .16s ease;
}
.entry-exit em {
  font-style: normal;
  font-size: 9px;
  letter-spacing: .16em;
  color: var(--ink-3);
}
.entry-exit:hover, .entry-exit:focus-visible {
  border-color: rgba(13,111,133,.55);
  color: var(--brand);
  background: rgba(13,111,133,.08);
}
.entry-exit:hover em { color: rgba(13,111,133,.75); }

/* 地图舞台 */
.entry-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(ellipse 900px 520px at 50% 44%, rgba(13,111,133,.085), transparent 68%),
    linear-gradient(180deg, rgba(246,250,253,.55), rgba(233,241,247,.92));
  overflow: hidden;
  isolation: isolate;
}
.entry-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(15,26,36,0.013) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,26,36,0.013) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 84% 78% at 50% 44%, #000 22%, transparent 84%);
  -webkit-mask-image: radial-gradient(ellipse 84% 78% at 50% 44%, #000 22%, transparent 84%);
}
.entry-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 150px rgba(15,26,36,0.085);
}
.entry-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: manipulation;
  transform-origin: 50% 52%;
  transition: opacity .5s ease;
}

/* ---------- 7c. 站点标签（坐标由脚本写入 --px/--py） ---------- */
.entry-nodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.entry-node {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate3d(var(--px, -999px), var(--py, -999px), 0) translate(-50%, -50%);
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 15px 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(13,111,133,.20);
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(246,250,253,.96));
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.28;
  white-space: nowrap;
  text-decoration: none;
  backdrop-filter: blur(9px) saturate(1.05);
  -webkit-backdrop-filter: blur(9px) saturate(1.05);
  box-shadow: 0 10px 28px rgba(15,26,36,0.168);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease, transform .18s cubic-bezier(.22,.68,.18,1);
  will-change: transform;
}
.entry-node-index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: rgba(13,111,133,.62);
  align-self: flex-start;
  margin-top: 1px;
  transition: color .18s ease;
}
.entry-node-body { display: inline-flex; flex-direction: column; gap: 2px; }
.entry-node strong { font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: .01em; }
.entry-node em { font-style: normal; font-size: 10.5px; color: var(--ink-3); letter-spacing: .02em; }

/* 四角括号 */
.entry-node-frame {
  position: absolute;
  inset: -6px;
  pointer-events: none;
  transition: inset .18s cubic-bezier(.22,.68,.18,1);
}
.entry-node-frame::before, .entry-node-frame::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  border: 1px solid rgba(13,111,133,.45);
  transition: width .18s ease, height .18s ease, border-color .18s ease;
}
.entry-node-frame::before { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.entry-node-frame::after { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.entry-node:hover, .entry-node:focus-visible, .entry-node[data-active="1"] {
  border-color: rgba(13,111,133,.62);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(240,247,251,.98));
  box-shadow: 0 0 0 1px rgba(13,111,133,.14), 0 16px 40px rgba(15,26,36,0.208), 0 0 34px rgba(13,111,133,.14);
  transform: translate3d(var(--px, -999px), var(--py, -999px), 0) translate(-50%, -50%) translateY(-3px);
}
.entry-node:hover .entry-node-index, .entry-node[data-active="1"] .entry-node-index { color: var(--brand); }
.entry-node:hover em, .entry-node:focus-visible em, .entry-node[data-active="1"] em { color: var(--ink-2); }
.entry-node:hover .entry-node-frame, .entry-node:focus-visible .entry-node-frame, .entry-node[data-active="1"] .entry-node-frame { inset: -11px; }
.entry-node:hover .entry-node-frame::before, .entry-node:hover .entry-node-frame::after, .entry-node:focus-visible .entry-node-frame::before, .entry-node:focus-visible .entry-node-frame::after, .entry-node[data-active="1"] .entry-node-frame::before, .entry-node[data-active="1"] .entry-node-frame::after {
  width: 17px;
  height: 17px;
  border-color: var(--brand);
}
.entry-node-hub {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate3d(var(--px, -999px), var(--py, -999px), 0) translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(13,111,133,.55);
  white-space: nowrap;
  pointer-events: none;
}

/* ---------- 7d. 说明：底部 HUD 条（只在选中站点时升起） ---------- */
.entry-dock {
  position: absolute;
  z-index: 3;
  left: clamp(14px, 3vw, 40px);
  right: clamp(14px, 3vw, 40px);
  bottom: 54px;
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(0, 1.9fr) minmax(0, 1.5fr) auto;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  padding: 16px clamp(16px, 2vw, 26px);
  border: 1px solid rgba(13,111,133,.16);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,250,253,.97));
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: 0 22px 60px rgba(15,26,36,0.220), 0 0 46px rgba(13,111,133,.06);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .28s ease, transform .28s cubic-bezier(.22,.68,.18,1), visibility .28s;
  pointer-events: none;
}
.entry-stage[data-focus="1"] .entry-dock {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.entry-dock-head {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}
.entry-dock-index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--brand);
  flex: 0 0 auto;
}
.entry-dock-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.entry-dock-desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.66;
  color: var(--ink-2);
  min-width: 0;
}
.entry-dock-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  min-width: 0;
}
.entry-dock-facts li {
  position: relative;
  padding-left: 12px;
  font-size: 11.5px;
  color: var(--ink-3);
  white-space: nowrap;
}
.entry-dock-facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: rgba(13,111,133,.75);
}
.entry-dock-go {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid rgba(13,111,133,.5);
  border-radius: 9px;
  background: rgba(13,111,133,.11);
  color: var(--ink);
  font-size: 12.5px;
  letter-spacing: .06em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .16s ease, border-color .16s ease, gap .16s ease;
}
.entry-dock-go em { font-style: normal; color: var(--brand); }
.entry-dock-go:hover, .entry-dock-go:focus-visible {
  background: rgba(13,111,133,.21);
  border-color: var(--brand);
  gap: 12px;
}

/* ---------- 7e. 底部一行 HUD ---------- */
.entry-stage-foot {
  position: absolute;
  z-index: 3;
  left: clamp(16px, 3vw, 40px);
  right: clamp(16px, 3vw, 40px);
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}
.entry-stage-tag {
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--ink-3);
  transition: color .2s ease;
}
.entry-stage[data-focus="1"] .entry-stage-tag { color: rgba(13,111,133,.85); }
.entry-stage-meta {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(13,111,133,.45);
}

/* ---------- 7f. 窄屏 ---------- */
@media (max-width: 900px) {.entry-dock {
    left: 12px;
    right: 12px;
    bottom: 44px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "head go" "desc desc" "facts facts";
    gap: 8px 12px;
    padding: 13px 14px;
    border-radius: 12px;
    max-height: 46vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
.entry-dock-head { grid-area: head; }
  /* 说明是动态正文：窄屏不截断行数，交给 .entry-dock 自身的 max-height + overflow-y 滚动。 */
.entry-dock-desc { grid-area: desc; font-size: 11.5px; line-height: 1.6; display: block; overflow: visible; }
  /* 窄屏也展示三项要点：详细介绍属于正文，不能因为宽度不足整段消失。 */
.entry-dock-facts {
    grid-area: facts;
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 2px;
  }
.entry-dock-facts li {
    font-size: 11px;
    line-height: 1.5;
    white-space: normal;
    padding-left: 11px;
  }
.entry-dock-facts li::before { top: 5px; }
.entry-dock-go { grid-area: go; padding: 9px 14px; font-size: 12px; }
.entry-dock-title { font-size: 14.5px; }
.entry-gate-brand { font-size: 23px; }
.entry-gate-btn { min-width: 168px; padding: 13px 24px; font-size: 14px; }
.entry-gate-foot { bottom: 62px; font-size: 11px; }
.entry-gate-copy { bottom: 26px; font-size: 10px; }
.entry-top { height: 56px; }
.entry-top-links { display: none; }
.entry-node { padding: 8px 12px 8px 10px; }
.entry-node strong { font-size: 12px; }
.entry-node em { font-size: 10px; }
.entry-overlay {
    left: 12px;
    right: 12px;
    bottom: 52px;
    width: auto;
    padding: 16px 16px 14px;
  }
.entry-overlay-title { font-size: 15px; }
.entry-overlay-desc { font-size: 12px; margin-bottom: 10px; }
.entry-overlay-list { margin-bottom: 12px; }
.entry-overlay-list li { padding: 7px 0 7px 14px; font-size: 11.5px; }
.entry-stage-meta { display: none; }
.entry-stage-tag { font-size: 10.5px; }
}
@media (max-width: 420px) {.entry-node em { display: none; }
.entry-node { gap: 7px; padding: 7px 11px 7px 9px; }
}

/* 粗指针：靠点击选中，悬浮态不生效 */
@media (pointer: coarse) {.entry-node:hover { transform: translate3d(var(--px, -999px), var(--py, -999px), 0) translate(-50%, -50%); }
.entry-node:hover .entry-node-frame { inset: -6px; }
.entry-node:hover .entry-node-frame::before, .entry-node:hover .entry-node-frame::after { width: 11px; height: 11px; border-color: rgba(13,111,133,.45); }
}

@media (prefers-reduced-motion: reduce) {.entry-gate-inner, .entry-gate-btn::after { animation: none !important; }
.entry-gate, .entry-content, .entry-overlay, .entry-node, .entry-node-frame, .entry-stage-tag { transition: none !important; }
.entry-map { transition: none !important; }
}

/* ---------- 7g. 进场层氛围场景 + 顶部标签（第六十一轮 浅色） ---------- */
.entry-gate { overflow: hidden; }
.entry-gate-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  opacity: .85;
  transition: opacity .5s ease;
}
.entry-gate[data-done="1"] .entry-gate-scene { opacity: 0; }
.entry-gate-top {
  position: absolute;
  top: clamp(20px, 3.4vh, 34px);
  left: clamp(18px, 3vw, 40px);
  z-index: 2;
}
.entry-gate-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px 6px 11px;
  border: 1px solid rgba(13,111,133,.22);
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.entry-gate-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0 rgba(13,111,133,.45);
  animation: gatePulse 2.4s ease-out infinite;
}
@keyframes gatePulse {
  0%   { box-shadow: 0 0 0 0 rgba(13,111,133,.45); }
  70%  { box-shadow: 0 0 0 7px rgba(13,111,133,0); }
  100% { box-shadow: 0 0 0 0 rgba(13,111,133,0); }
}
.entry-gate-inner { position: relative; z-index: 2; }

/* 品牌块：浅底上的青描边方块 */
.brand-mark {
  background: linear-gradient(150deg, #f2f9fc 0%, #e2f1f7 100%);
  border: 1px solid rgba(13,111,133,.38);
  box-shadow: 0 0 22px rgba(13,111,133,.14), inset 0 0 12px rgba(13,111,133,.10);
}

@media (prefers-reduced-motion: reduce) {.entry-gate-pill i { animation: none !important; }
}
@media (max-width: 900px) {.entry-gate-pill { font-size: 9px; letter-spacing: .16em; padding: 5px 11px 5px 9px; }
.entry-gate-scene { opacity: .75; }
}

/* ---------- 7h. 宽表首列吸附（第六十一轮） ----------
   卡密 / 代理 / 账单 / 软件四张表在 1440 下仍会横向溢出 120-400px，
   横向滚动后看不到行首标识（卡密串、代理标识、订单号、软件名）。
   把首列固定在左侧，滚动时始终能看到"我在看哪一行"，不改列宽也不改数据结构。 */
.table-wrap table th:first-child, .table-wrap table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--border), 8px 0 12px -10px rgba(15,26,36,.22);
}
.table-wrap table thead th:first-child {
  z-index: 3;
  background: var(--surface-3);
}
.table-wrap table tbody tr:hover td:first-child { background: var(--surface-2); }
/* 横向滚动条不再贴住圆角，给一点内缩，浅底上更干净 */
.table-wrap { scrollbar-gutter: stable; }
@media (max-width: 900px) {
  /* 窄屏表格改成卡片式堆叠时不需要吸附列 */
.table-wrap table th:first-child, .table-wrap table td:first-child { position: static; box-shadow: none; }
}

/* ---------- 7i. 六项统计卡一行（第六十一轮） ----------
   开发者仪表盘从 4 项扩到 6 项后，沿用 4 列会换行成 4+2 的缺口。
   1440 以上六列并排；1100-1440 三列两行；900 以下两列。 */
.cards.cards-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1399px) {.cards.cards-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
 }
@media (max-width: 900px) {.cards.cards-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 }
@media (max-width: 520px) {.cards.cards-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 }

/* ---------- 7j. 登录页左栏：蓝图面板（第六十一轮） ----------
   原来左栏上半是三行文字、下半是三条清单，中间一大块空白，观感松散。
   改成：顶部品牌 + 编号 01/02/03 的清单贴着底部，右侧一条深青竖线收边，
   网格更密一档，读起来像工程图纸而不是空卡片。 */
.login-view .auth-aside {
  position: relative;
  padding: 34px 30px 28px;
  background-color: #f1f8fb;
  background-image:
    radial-gradient(ellipse 460px 300px at 8% -6%, rgba(13,111,133,.15), transparent 62%),
    linear-gradient(to right, rgba(15,26,36,.030) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,26,36,.030) 1px, transparent 1px);
  background-size: auto, 22px 22px, 22px 22px;
  border-right: 1px solid rgba(13,111,133,.20);
}
.login-view .auth-aside::before {
  content: "";
  position: absolute;
  right: -1px;
  top: 26px;
  bottom: 26px;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(13,111,133,.55) 18%, rgba(13,111,133,.55) 82%, transparent);
  pointer-events: none;
}
.login-view .auth-brand { margin-bottom: 22px; }
.login-view .auth-aside h1 {
  font-size: 23px;
  line-height: 1.32;
  letter-spacing: -.01em;
}
.login-view .auth-aside .login-entry-hint {
  margin-bottom: 0;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 30ch;
}
.login-view .auth-facts {
  margin-top: auto;
  padding-top: 4px;
  counter-reset: factIndex;
  border-top-color: rgba(15,26,36,.07);
}
.login-view .auth-facts li {
  position: relative;
  grid-template-columns: 26px 58px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-bottom-color: rgba(15,26,36,.06);
}
.login-view .auth-facts li::before {
  counter-increment: factIndex;
  content: counter(factIndex, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: rgba(13,111,133,.55);
  line-height: 1.9;
}
.login-view .auth-facts strong { font-weight: 600; font-size: 13px; }
.login-view .auth-facts span { font-size: 12.5px; color: var(--ink-2); }
@media (max-width: 900px) {.login-view .auth-aside { padding: 26px 22px 22px; }
.login-view .auth-aside::before { display: none; }
.login-view .auth-facts li { grid-template-columns: 24px 54px 1fr; }
}

/* 左栏脚注：一行等宽小字，把面板高度收口，避免底部像被切掉 */
.auth-aside-foot {
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-strong);
}
@media (max-width: 900px) {.auth-aside-foot { display: none; }
 }

/* 节点状态页：摘要网格同样要给右上角刷新按钮让位，否则按钮压在「当前节点」框上 */
.panel-has-refresh > .mini-stats { padding-right: 44px; }
@media (max-width: 900px) {.panel-has-refresh > .mini-stats { padding-right: 0; padding-top: 0; }
}

/* ==========================================================================
   第六十三轮：极端数据破版（超长名称 / 大数字）修复
   1) `.sdk-test-panel` 是 grid，子项默认 min-width:auto，超长标题会把整列撑到 944px，
      390 宽下把「复制密钥」、参数网格整片推出视口 —— 列用 minmax(0,1fr) 并给子链 min-width:0。
   2) `.tag` 是没有断词点的超长单词（应用名/标识）时按 normal 溢出到视口外 —— 允许 anywhere 换行。
   ========================================================================== */
.sdk-test-panel { grid-template-columns: minmax(0, 1fr); }
.sdk-test-panel > * { min-width: 0; }
.sdk-test-head { min-width: 0; }
.sdk-test-head > div { min-width: 0; }
.sdk-test-head h2 { overflow-wrap: anywhere; }
.tag { max-width: 100%; overflow-wrap: anywhere; }

/* 无障碍工具类：仅供读屏读取的标题/说明。视觉上不可见但**不能** display:none（那样读屏也读不到）。
   第六十五轮引入：入口进场页只有视觉上的品牌字（strong），缺一级标题；用它在不改视觉的前提下补齐语义。 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ===== .env 面板分层（第六十六轮）：常用 / 高级 ===== */
.env-tier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 2px 2px;
  font-size: 13px;
  color: var(--text);
}
.env-tier-head .muted { font-weight: 400; }
.env-tier-advanced {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.env-tier-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  font-weight: 600;
  color: var(--brand-strong);
  cursor: pointer;
}
.env-tier-toggle input { width: auto; }
/* 高级参数折叠：CSP style-src 不含 unsafe-inline 时，内联 style 属性会被浏览器丢弃，
   折叠必须走 class 而不是 style.display。 */
.env-tier-advanced-box.is-collapsed { display: none; }
/* 行内字段（如"验证码 + 获取按钮"）：原用内联 style，同样受 CSP 限制。 */
.field-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}
.field-inline > input { flex: 1 1 auto; min-width: 0; }
/* ===== 系统设置折叠分节（第六十六轮）：次要配置默认收起 ===== */
.panel.settings-fold > summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  list-style: none;
  min-height: 28px;
}
.panel.settings-fold > summary::-webkit-details-marker { display: none; }
.panel.settings-fold > summary::after {
  content: "展开";
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-strong);
}
.panel.settings-fold[open] > summary::after { content: "收起"; }
.panel.settings-fold > summary .muted { font-weight: 400; }
.panel.settings-fold[open] > summary { margin-bottom: 10px; }

/* r200: 窄屏触控目标至少 36px，避免 28-34px 高的次级按钮在手机上难以点按。 */
@media (max-width: 640px) {
  button,
  .primary,
  .ghost,
  .ghost.small-btn,
  .small-btn,
  .menu-item,
  .menu-parent,
  .submenu .menu-item,
  .user-tabs button,
  .pagination-actions button,
  .actions .primary,
  .actions .ghost,
  .actions .link-btn,
  .toolbar .primary,
  .toolbar .ghost,
  .filter-actions .primary,
  .filter-actions .ghost,
  .sdk-downloads a,
  .sdk-resource-row a,
  .table-wrap .actions a,
  .table-wrap .actions button {
    min-height: 36px;
  }
}