/* =========================================================
   AgentFleet 控制台 · 深色主题（纯静态，无第三方依赖）
   ========================================================= */

:root {
  --bg: #080b11;
  --bg-deep: #060810;
  --sidebar: #0b0f17;
  --panel: #0f141e;
  --panel-2: #121825;
  --panel-3: #161d2c;
  --border: #1c2534;
  --border-strong: #273346;
  --text: #e2e8f3;
  --text-dim: #94a2b8;
  --text-faint: #64728a;
  --accent: #5cc8ff;
  --accent-2: #7c9cff;
  --accent-dim: rgba(92, 200, 255, 0.12);
  --ok: #3ddc97;
  --ok-dim: rgba(61, 220, 151, 0.12);
  --warn: #f5b74e;
  --warn-dim: rgba(245, 183, 78, 0.12);
  --danger: #ff6b6b;
  --danger-dim: rgba(255, 107, 107, 0.12);
  --idle: #7d8aa0;
  --idle-dim: rgba(125, 138, 160, 0.12);
  --radius: 10px;
  --radius-sm: 7px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --sidebar-w: 226px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg-deep);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 78% -10%, rgba(92, 200, 255, 0.055), transparent 62%),
    radial-gradient(900px 520px at 8% 108%, rgba(124, 156, 255, 0.05), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: rgba(92, 200, 255, 0.28);
}

/* 滚动条 */
* {
  scrollbar-width: thin;
  scrollbar-color: #2a3547 transparent;
}
*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
*::-webkit-scrollbar-thumb {
  background: #263143;
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: #334158;
  background-clip: padding-box;
  border: 2px solid transparent;
}
*::-webkit-scrollbar-track {
  background: transparent;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
}

/* ============ 布局 ============ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100vh;
  padding: 18px 14px 14px;
  background: linear-gradient(180deg, rgba(16, 22, 33, 0.92), rgba(9, 13, 21, 0.96));
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 6px 16px;
  border-bottom: 1px solid var(--border);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(140deg, #1b4a63, #13314a 55%, #142238);
  border: 1px solid rgba(92, 200, 255, 0.32);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.brand-text strong {
  font-size: 14px;
  letter-spacing: 0.2px;
}
.brand-text span {
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 1.5px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  color: var(--text-dim);
  font-size: 12.5px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-decoration: none;
}
.nav-item.active {
  background: var(--accent-dim);
  border-color: rgba(92, 200, 255, 0.22);
  color: #cdeaff;
}
.nav-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.65;
}

.side-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}
.side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  color: var(--text-faint);
  font-size: 10.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.side-count {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  font-size: 10px;
  text-align: center;
  letter-spacing: 0;
}
.side-nodes {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow-y: auto;
}
.side-node {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 12px;
  min-width: 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.side-node:hover {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-decoration: none;
}
.side-node.active {
  background: rgba(92, 200, 255, 0.08);
  color: #cdeaff;
}
.side-node-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-node-meta {
  color: var(--text-faint);
  font-size: 10.5px;
  font-family: var(--mono);
}
.side-empty {
  padding: 5px 8px;
  color: var(--text-faint);
  font-size: 11.5px;
}

.side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.conn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-dim);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--idle);
  flex: none;
}
.conn-live {
  color: var(--ok);
  border-color: rgba(61, 220, 151, 0.3);
  background: var(--ok-dim);
}
.conn-live .conn-dot {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.16);
  animation: pulse 2.4s infinite;
}
.conn-polling {
  color: var(--warn);
  border-color: rgba(245, 183, 78, 0.3);
  background: var(--warn-dim);
}
.conn-polling .conn-dot {
  background: var(--warn);
}
.conn-offline {
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.32);
  background: var(--danger-dim);
}
.conn-offline .conn-dot {
  background: var(--danger);
}
.conn-demo {
  color: var(--accent-2);
  border-color: rgba(124, 156, 255, 0.32);
  background: rgba(124, 156, 255, 0.1);
}
.conn-demo .conn-dot {
  background: var(--accent-2);
}
.conn-connecting .conn-dot {
  animation: pulse 1.4s infinite;
}

.side-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
  color: var(--text-faint);
  font-size: 10.5px;
  font-family: var(--mono);
}
.link-btn {
  padding: 2px 6px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--text-faint);
  font-size: 11px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.link-btn:hover {
  color: var(--accent);
  border-color: rgba(92, 200, 255, 0.24);
  background: var(--accent-dim);
}
.link-btn[aria-pressed="true"] {
  color: var(--accent-2);
  border-color: rgba(124, 156, 255, 0.3);
  background: rgba(124, 156, 255, 0.1);
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ============ 顶栏 ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(8, 11, 17, 0.82);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.page-heading {
  min-width: 0;
}
.page-heading h1 {
  font-size: 17px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-sub {
  margin-top: 2px;
  color: var(--text-faint);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.server-info {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-dim);
  font-size: 11.5px;
  font-family: var(--mono);
  white-space: nowrap;
}
.server-info .si-name {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.server-info .si-sep {
  color: var(--border-strong);
}
.clock {
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* ============ 通用按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    transform 0.08s ease, opacity 0.15s ease;
}
.btn:hover {
  background: var(--panel-3);
  border-color: #334158;
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.btn-primary {
  border-color: rgba(92, 200, 255, 0.44);
  background: linear-gradient(180deg, rgba(92, 200, 255, 0.2), rgba(92, 200, 255, 0.12));
  color: #d7f1ff;
}
.btn-primary:hover {
  border-color: rgba(92, 200, 255, 0.66);
  background: linear-gradient(180deg, rgba(92, 200, 255, 0.28), rgba(92, 200, 255, 0.16));
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-dim);
}
.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--border-strong);
}
.btn-danger {
  border-color: rgba(255, 107, 107, 0.4);
  color: #ffc9c9;
  background: rgba(255, 107, 107, 0.08);
}
.btn-danger:hover {
  border-color: rgba(255, 107, 107, 0.62);
  background: rgba(255, 107, 107, 0.16);
}
.btn-xs {
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11.5px;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.btn-row-end {
  justify-content: flex-end;
}

.spinner {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(92, 200, 255, 0.22);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex: none;
}
.spinner.sm {
  width: 11px;
  height: 11px;
  border-width: 1.6px;
}

/* ============ 视图容器 ============ */
.view {
  flex: 1;
  min-width: 0;
  padding: 18px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.boot-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 48px 8px;
  color: var(--text-faint);
  font-size: 12.5px;
}
.page-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

/* ============ 面板 ============ */
.panel {
  min-width: 0;
  background: linear-gradient(180deg, rgba(18, 24, 37, 0.72), rgba(14, 19, 29, 0.86));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset;
  overflow: hidden;
}
.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

/* 两栏面板布局（节点页表单/命令、总览的任务/事件） */
.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}
.grid-2 > * {
  min-width: 0;
}
.panel-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.panel-title .panel-sub {
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 400;
}
.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.panel-body {
  padding: 14px 16px;
}
.panel-body.tight {
  padding: 10px 12px;
}
.panel-note {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 11px;
}

/* ============ 统计卡 ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.card {
  position: relative;
  min-width: 0;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(20, 27, 41, 0.8), rgba(13, 18, 27, 0.9));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(92, 200, 255, 0.24), transparent);
}
.card-label {
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.6px;
}
.card-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.4px;
}
.card-value .card-unit {
  color: var(--text-faint);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0;
}
.card-foot {
  margin-top: 5px;
  color: var(--text-faint);
  font-size: 11px;
  min-height: 16px;
}
.card-accent .card-value {
  color: var(--accent);
}
.card-ok .card-value {
  color: var(--ok);
}
.card-warn .card-value {
  color: var(--warn);
}

/* ============ 徽标 / 状态 ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 7px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  font-size: 10.5px;
  line-height: 1.65;
  white-space: nowrap;
  vertical-align: middle;
}
.badge .dot,
.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.tone-ok {
  color: var(--ok);
  border-color: rgba(61, 220, 151, 0.3);
  background: var(--ok-dim);
}
.tone-warn {
  color: var(--warn);
  border-color: rgba(245, 183, 78, 0.3);
  background: var(--warn-dim);
}
.tone-danger {
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.3);
  background: var(--danger-dim);
}
.tone-idle {
  color: var(--idle);
  border-color: var(--border-strong);
  background: rgba(125, 138, 160, 0.1);
}
.tone-info {
  color: var(--accent);
  border-color: rgba(92, 200, 255, 0.3);
  background: var(--accent-dim);
}
.tone-accent2 {
  color: var(--accent-2);
  border-color: rgba(124, 156, 255, 0.3);
  background: rgba(124, 156, 255, 0.1);
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--idle);
  flex: none;
}
.status-dot.online {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.14);
}
.status-dot.offline {
  background: var(--idle);
}
.status-dot.danger {
  background: var(--danger);
}
.status-dot.warn {
  background: var(--warn);
}

/* ============ 表格 ============ */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.table th {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.7px;
  text-align: left;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.015);
}
.table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(28, 37, 52, 0.62);
  color: var(--text-dim);
  vertical-align: middle;
}
.table tbody tr:last-child td {
  border-bottom: none;
}
.table tbody tr.clickable {
  cursor: pointer;
  transition: background 0.12s ease;
}
.table tbody tr.clickable:hover,
.table tbody tr.clickable:focus-visible {
  background: rgba(92, 200, 255, 0.05);
  outline: none;
}
.table .cell-main {
  color: var(--text);
  font-weight: 500;
}
.table .cell-mono {
  font-family: var(--mono);
  font-size: 11.5px;
}
.table .nowrap {
  white-space: nowrap;
}
.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
  font-size: 11.5px;
}
.table .col-usage {
  width: 140px;
  min-width: 112px;
}
.cell-ellipsis {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table-compact th,
.table-compact td {
  padding: 7px 9px;
}
.table-compact .cell-ellipsis {
  max-width: 150px;
}
.cell-name {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.cell-name .sub {
  color: var(--text-faint);
  font-size: 10.5px;
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 进度条 / 用量条 */
.meter {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 84px;
}
.meter-track {
  position: relative;
  flex: 1;
  height: 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(92, 200, 255, 0.55), var(--accent));
  transition: width 0.5s ease;
}
.meter-fill.warn {
  background: linear-gradient(90deg, rgba(245, 183, 78, 0.6), var(--warn));
}
.meter-fill.danger {
  background: linear-gradient(90deg, rgba(255, 107, 107, 0.6), var(--danger));
}
.meter-fill.ok {
  background: linear-gradient(90deg, rgba(61, 220, 151, 0.55), var(--ok));
}
.meter-text {
  width: 34px;
  text-align: right;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  flex: none;
}

.progress {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 130px;
}
.progress-track {
  position: relative;
  flex: 1;
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(92, 200, 255, 0.5), var(--accent));
  transition: width 0.5s ease;
}
.progress-fill.done {
  background: linear-gradient(90deg, rgba(61, 220, 151, 0.5), var(--ok));
}
.progress-fill.failed {
  background: linear-gradient(90deg, rgba(255, 107, 107, 0.5), var(--danger));
}
.progress-text {
  width: 42px;
  text-align: right;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  flex: none;
}

/* ============ 提示 / 空状态 ============ */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 28px 16px;
  color: var(--text-faint);
  font-size: 12px;
  text-align: center;
}
.empty .empty-title {
  color: var(--text-dim);
  font-size: 12.5px;
}
.empty .empty-hint {
  font-size: 11px;
  color: var(--text-faint);
}
.empty-inline {
  padding: 12px 16px;
  color: var(--text-faint);
  font-size: 11.5px;
}

/* ============ 连接/告警条 ============ */
.notice-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 183, 78, 0.28);
  background: rgba(245, 183, 78, 0.07);
  color: #e8c887;
  font-size: 12px;
}
.notice-bar .badge {
  flex: none;
}
.notice-bar.danger {
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.07);
  color: #f0b3b3;
}
.notice-bar .spacer {
  flex: 1;
}

/* ============ 图表 ============ */
.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 0;
  flex-wrap: wrap;
}
.chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.legend-swatch {
  width: 14px;
  height: 2px;
  border-radius: 2px;
  flex: none;
}
.legend-swatch.cpu {
  background: var(--accent);
}
.legend-swatch.mem {
  background: var(--accent-2);
}
.legend-swatch.loss {
  background: var(--warn);
}
.legend-swatch.acc {
  background: var(--ok);
}
.chart-body {
  position: relative;
  padding: 6px 12px 12px;
}
.chart-canvas {
  display: block;
  width: 100%;
  height: 170px;
}
.chart-range {
  color: var(--text-faint);
  font-size: 10.5px;
  font-family: var(--mono);
}

/* ============ 节点详情头部 ============ */
.node-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 14px 16px;
}
.node-name {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
}
.node-name .node-id {
  color: var(--text-faint);
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 400;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 18px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
}
.info-item {
  min-width: 0;
}
.info-label {
  color: var(--text-faint);
  font-size: 10.5px;
  letter-spacing: 0.4px;
}
.info-value {
  margin-top: 2px;
  color: var(--text-dim);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.info-value.mono {
  font-family: var(--mono);
  font-size: 11.5px;
}

/* ============ 智能体卡片 ============ */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.agent-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 15px;
  background: linear-gradient(180deg, rgba(22, 29, 44, 0.55), rgba(15, 20, 30, 0.7));
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.agent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.agent-title {
  min-width: 0;
}
.agent-title .agent-name {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.agent-title .agent-id {
  margin-top: 2px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 10.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex: none;
}
.kv-list {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 4px 10px;
  font-size: 11.5px;
}
.kv-key {
  color: var(--text-faint);
  white-space: nowrap;
}
.kv-val {
  min-width: 0;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}
.kv-val.mono {
  font-family: var(--mono);
  font-size: 11px;
}
.kv-val .error {
  color: var(--danger);
}
.agent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 2px;
}
.agent-empty {
  color: var(--text-faint);
  font-size: 11px;
}

/* ============ 表单 ============ */
.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 14px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.field.span-2 {
  grid-column: span 2;
}
.field > label {
  color: var(--text-dim);
  font-size: 11.5px;
}
.field > label .req {
  color: var(--danger);
  margin-left: 2px;
}
.field .hint {
  color: var(--text-faint);
  font-size: 10.5px;
  line-height: 1.45;
}
.field .field-error {
  color: var(--danger);
  font-size: 10.5px;
  min-height: 0;
}
.input,
.select,
.textarea {
  width: 100%;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: rgba(6, 9, 15, 0.6);
  color: var(--text);
  font-size: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.input:hover,
.select:hover,
.textarea:hover {
  border-color: #34435a;
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: rgba(92, 200, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(92, 200, 255, 0.1);
  background: rgba(6, 9, 15, 0.85);
}
.input.invalid,
.textarea.invalid {
  border-color: rgba(255, 107, 107, 0.6);
}
.input::placeholder,
.textarea::placeholder {
  color: #4d5b70;
}
.textarea {
  min-height: 84px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.55;
}
.select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-faint) 50%),
    linear-gradient(135deg, var(--text-faint) 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}
.select option {
  background: var(--panel-2);
  color: var(--text);
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-dim);
  font-size: 11.5px;
  cursor: pointer;
  user-select: none;
}
.check input {
  width: 13px;
  height: 13px;
  accent-color: var(--accent);
  margin: 0;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
}
.form-actions .spacer {
  flex: 1;
}
.form-note {
  color: var(--text-faint);
  font-size: 10.5px;
  line-height: 1.5;
}

/* ============ 日志面板 ============ */
.log-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.log-toolbar .select {
  width: auto;
  min-width: 132px;
  max-width: 200px;
  padding-top: 4px;
  padding-bottom: 4px;
  font-size: 11.5px;
}
.log-list {
  height: 264px;
  overflow-y: auto;
  padding: 8px 0;
  background: rgba(5, 8, 13, 0.55);
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
}
.log-line {
  display: flex;
  gap: 8px;
  padding: 1px 14px;
  color: #a7b4c8;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.log-line:hover {
  background: rgba(92, 200, 255, 0.045);
}
.log-line .log-time {
  flex: none;
  color: #55647a;
  font-size: 10.5px;
}
.log-line .log-tag {
  flex: none;
  color: var(--accent-2);
  font-size: 10.5px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.log-line .log-stream {
  flex: none;
  color: var(--text-faint);
  font-size: 10px;
  padding: 0 2px;
}
.log-line .log-text {
  flex: 1;
  min-width: 0;
}
.log-line.stderr .log-text {
  color: #f0a3a3;
}
.log-line.system .log-text {
  color: var(--text-faint);
  font-style: italic;
}
.log-empty {
  padding: 24px 14px;
  color: var(--text-faint);
  font-size: 11.5px;
  text-align: center;
}
.log-count {
  color: var(--text-faint);
  font-size: 10.5px;
  font-family: var(--mono);
  white-space: nowrap;
}

/* ============ 任务 ============ */
.jobs-layout {
  display: grid;
  grid-template-columns: 372px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.job-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 14px 16px;
}
.job-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
}
.job-id {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
}
.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 0 16px 12px;
  color: var(--text-faint);
  font-size: 11px;
}
.job-meta b {
  color: var(--text-dim);
  font-weight: 500;
}
.job-progress {
  padding: 0 16px 16px;
}
.job-progress .progress-track {
  height: 8px;
}
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 1px;
  border-top: 1px solid var(--border);
  background: var(--border);
}
.metric-chip {
  padding: 10px 14px;
  background: var(--panel);
  min-width: 0;
}
.metric-chip .metric-label {
  color: var(--text-faint);
  font-size: 10px;
  letter-spacing: 0.4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.metric-chip .metric-value {
  margin-top: 2px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.artifact-list {
  display: flex;
  flex-direction: column;
}
.artifact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  border-bottom: 1px solid rgba(28, 37, 52, 0.62);
}
.artifact-row:last-child {
  border-bottom: none;
}
.artifact-name {
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.artifact-meta {
  color: var(--text-faint);
  font-size: 10.5px;
  font-family: var(--mono);
  white-space: nowrap;
}
.params-pre {
  margin: 0;
  padding: 12px 16px;
  max-height: 220px;
  overflow: auto;
  color: #b9c6d9;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ============ 事件流 ============ */
.event-list {
  display: flex;
  flex-direction: column;
  max-height: 320px;
  overflow-y: auto;
}
.event-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 16px;
  border-bottom: 1px solid rgba(28, 37, 52, 0.5);
  font-size: 11.5px;
}
.event-row:last-child {
  border-bottom: none;
}
.event-time {
  flex: none;
  width: 62px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 10.5px;
  padding-top: 1px;
}
.event-body {
  flex: 1;
  min-width: 0;
}
.event-line1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
}
.event-type {
  color: var(--text);
  font-size: 11.5px;
}
.event-node {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 10.5px;
}
.event-data {
  margin-top: 1px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 10.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.event-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-top: 6px;
  flex: none;
  background: var(--idle);
}
.event-dot.ok {
  background: var(--ok);
}
.event-dot.warn {
  background: var(--warn);
}
.event-dot.danger {
  background: var(--danger);
}
.event-dot.info {
  background: var(--accent);
}
.event-dot.accent2 {
  background: var(--accent-2);
}

/* 活跃任务小列表 */
.mini-job {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  border-bottom: 1px solid rgba(28, 37, 52, 0.5);
}
.mini-job:last-child {
  border-bottom: none;
}
.mini-job-main {
  flex: 1;
  min-width: 0;
}
.mini-job-name {
  color: var(--text);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-job-sub {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 10.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-job .progress {
  width: 180px;
  flex: none;
}
.mini-job-link {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 9px;
  color: var(--text-dim);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}
.mini-job-link:hover {
  color: var(--accent);
  border-color: rgba(92, 200, 255, 0.3);
  background: var(--accent-dim);
}

/* ============ 弹窗 ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 5, 9, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal {
  width: min(440px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: linear-gradient(180deg, #151c29, #10151f);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px 12px;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-size: 13.5px;
  font-weight: 600;
}
.modal-close {
  border: none;
  background: transparent;
  color: var(--text-faint);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.modal-close:hover {
  color: var(--text);
}
.modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  color: var(--text-dim);
  font-size: 12.5px;
}
.modal-body p {
  margin: 0;
  line-height: 1.6;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--border);
}
.modal-actions .spacer {
  flex: 1;
}
.modal .token-input {
  font-family: var(--mono);
}
.modal .form-note {
  color: var(--text-faint);
}
.modal-error {
  color: var(--danger);
  font-size: 11.5px;
}

/* ============ Toast ============ */
.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
  max-width: min(420px, calc(100vw - 36px));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: rgba(18, 24, 36, 0.97);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  pointer-events: auto;
  animation: toast-in 0.2s ease;
  overflow-wrap: anywhere;
}
.toast .toast-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 5px;
  flex: none;
  background: var(--accent);
}
.toast.tone-ok {
  border-color: rgba(61, 220, 151, 0.32);
  color: #b8f0d6;
}
.toast.tone-ok .toast-dot {
  background: var(--ok);
}
.toast.tone-danger {
  border-color: rgba(255, 107, 107, 0.38);
  color: #ffc2c2;
}
.toast.tone-danger .toast-dot {
  background: var(--danger);
}
.toast.tone-warn {
  border-color: rgba(245, 183, 78, 0.32);
  color: #f0d5a3;
}
.toast.tone-warn .toast-dot {
  background: var(--warn);
}
.toast.leaving {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* 错误块（视图级） */
.error-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 20px;
  color: var(--text-dim);
  text-align: center;
}
.error-block .error-title {
  color: var(--danger);
  font-size: 13px;
}
.error-block .error-detail {
  color: var(--text-faint);
  font-size: 11.5px;
  max-width: 480px;
  overflow-wrap: anywhere;
}

/* ============ 小型工具 ============ */
.muted {
  color: var(--text-faint);
}
.mono {
  font-family: var(--mono);
}
.nowrap {
  white-space: nowrap;
}
.hidden {
  display: none !important;
}
.spacer {
  flex: 1;
}
.tag {
  display: inline-block;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.7;
}
.copy-btn {
  padding: 0 4px;
  border: none;
  background: transparent;
  color: var(--text-faint);
  font-size: 10.5px;
  cursor: pointer;
  border-radius: 3px;
}
.copy-btn:hover {
  color: var(--accent);
  background: var(--accent-dim);
}
.section-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 2px 2px 0;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.section-title .sub {
  color: var(--text-faint);
  font-size: 10.5px;
  font-weight: 400;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ============ 动画 ============ */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ============ 响应式 ============ */
@media (max-width: 1180px) {
  .jobs-layout {
    grid-template-columns: 330px minmax(0, 1fr);
  }
  .info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .app {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    padding: 10px 16px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow: visible;
  }
  .brand {
    padding: 0;
    border-bottom: none;
    flex: none;
  }
  .brand-text span {
    display: none;
  }
  .nav {
    flex-direction: row;
    gap: 4px;
  }
  .side-section {
    display: none;
  }
  .side-foot {
    margin-top: 0;
    margin-left: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding-top: 0;
    border-top: none;
  }
  .side-meta {
    display: none;
  }
  .topbar {
    padding: 12px 18px;
  }
  .view {
    padding: 14px 18px 32px;
  }
  .jobs-layout {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .agents-grid {
    grid-template-columns: 1fr;
  }
  .server-info {
    display: none;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 12.5px;
  }
  .sidebar {
    padding: 9px 12px;
    gap: 10px 12px;
  }
  .brand-mark {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }
  .brand-text strong {
    font-size: 13px;
  }
  .nav-item {
    padding: 6px 9px;
    font-size: 12px;
  }
  .conn {
    font-size: 11px;
    padding: 4px 8px;
  }
  .topbar {
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 10px 14px;
  }
  .page-heading h1 {
    font-size: 15px;
  }
  .page-sub {
    font-size: 11px;
  }
  .topbar-right {
    gap: 7px;
  }
  .clock {
    font-size: 10.5px;
    padding: 3px 7px;
  }
  .btn {
    padding: 5px 10px;
    font-size: 11.5px;
  }
  .view {
    padding: 12px 14px 28px;
    gap: 12px;
  }
  .cards {
    gap: 10px;
  }
  .card {
    padding: 12px 13px;
  }
  .card-value {
    font-size: 22px;
  }
  .panel-head {
    padding: 10px 12px;
  }
  .panel-body {
    padding: 12px;
  }
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px 12px 12px;
  }
  .node-head {
    padding: 12px;
  }
  .table th,
  .table td {
    padding: 7px 9px;
  }
  .chart-canvas {
    height: 150px;
  }
  .mini-job .progress {
    width: 120px;
  }
  .modal-overlay {
    padding: 14px;
  }
  .toasts {
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 900px) {
  .table .col-os {
    display: none;
  }
  .table th,
  .table td {
    padding: 7px 9px;
  }
}

@media (max-width: 640px) {
  .cells-hide-sm {
    display: none;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field.span-2 {
    grid-column: span 1;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .agent-head {
    flex-direction: column;
  }
  .job-head {
    padding: 12px;
  }
  .job-meta {
    padding: 0 12px 10px;
  }
  .job-progress {
    padding: 0 12px 12px;
  }
  .metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* =========================================================
   运营层页面（客户 / 工单 / 目录 / 告警 / 账单）
   ========================================================= */
.nav-item .nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  margin-left: auto;
  border-radius: 8px;
  background: var(--danger-dim);
  color: var(--danger);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1;
}
.nav-count.tone-warn {
  background: var(--warn-dim);
  color: var(--warn);
}
.nav-count.tone-danger {
  background: var(--danger-dim);
  color: var(--danger);
}

.cards-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.card-link {
  display: block;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.card-link:hover {
  text-decoration: none;
}
.card-link .card {
  height: 100%;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.card-link:hover .card {
  border-color: rgba(92, 200, 255, 0.32);
  background: linear-gradient(180deg, rgba(24, 33, 49, 0.9), rgba(15, 21, 32, 0.95));
}
.card-link:focus-visible .card {
  outline: none;
  border-color: rgba(92, 200, 255, 0.5);
}
.card-danger .card-value {
  color: var(--danger);
}

.ops-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--border);
}
.ops-actions .spacer {
  flex: 1;
}
.row-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
}
.ops-col-actions {
  width: 1%;
  white-space: nowrap;
}
.link-inline {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent);
}
.link-inline.danger {
  color: var(--danger);
}
.link-inline:hover {
  text-decoration: underline;
}
.search-input {
  width: 230px;
}
.month-input {
  width: 150px;
  font-family: var(--mono);
  font-size: 11.5px;
}

/* 列表行状态 */
.table tbody tr.row-overdue td {
  background: rgba(255, 107, 107, 0.055);
}
.table tbody tr.row-overdue td:first-child {
  box-shadow: inset 2px 0 0 var(--danger);
}
.table tbody tr.row-muted td {
  opacity: 0.62;
}
.table tfoot td {
  padding: 9px 12px;
  border-top: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-dim);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.sla-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 96px;
}
.sla-note {
  color: var(--text-faint);
  font-size: 10.5px;
  font-family: var(--mono);
  white-space: nowrap;
}
.sla-cell.overdue .sla-note {
  color: var(--danger);
}

/* 摘要 chips */
.summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(20, 27, 41, 0.72), rgba(13, 18, 27, 0.85));
  color: var(--text-dim);
  font-size: 11.5px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.summary-chip:hover {
  border-color: rgba(92, 200, 255, 0.32);
  color: var(--text);
}
.summary-chip.active {
  border-color: rgba(92, 200, 255, 0.55);
  background: var(--accent-dim);
  color: var(--text);
}
.summary-chip strong {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.summary-chip.tone-warn strong {
  color: var(--warn);
}
.summary-chip.tone-danger strong {
  color: var(--danger);
}
.summary-chip.tone-ok strong {
  color: var(--ok);
}
.summary-chip.tone-info strong,
.summary-chip.tone-accent2 strong {
  color: var(--accent);
}

/* 详情页 */
.tag-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pre-wrap {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.65;
}
.feedback-line {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  color: var(--text-dim);
  font-size: 12px;
}
.mini-list {
  display: flex;
  flex-direction: column;
  padding: 0 16px;
}
.mini-list .empty {
  margin: 12px 0;
}
.mini-job.clickable {
  cursor: pointer;
}
.mini-job.clickable:hover {
  background: rgba(92, 200, 255, 0.05);
}
.mini-job.clickable:focus-visible {
  outline: 1px solid rgba(92, 200, 255, 0.4);
  outline-offset: -1px;
}

/* 时间线 */
.timeline {
  display: flex;
  flex-direction: column;
  padding: 12px 16px 16px 20px;
}
.timeline-item {
  position: relative;
  padding: 0 0 14px 16px;
  border-left: 1px solid var(--border);
}
.timeline-item:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}
.timeline-dot {
  position: absolute;
  left: -4px;
  top: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(92, 200, 255, 0.12);
}
.timeline-dot.customer {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(245, 183, 78, 0.12);
}
.timeline-dot.system {
  background: var(--idle);
  box-shadow: none;
}
.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}
.timeline-label {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.timeline-meta {
  color: var(--text-faint);
  font-size: 10.5px;
  font-family: var(--mono);
}
.timeline-note {
  margin-top: 3px;
  color: var(--text-dim);
  font-size: 11.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 一次性凭据 */
.secret-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(6, 9, 15, 0.55);
}
.copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.copy-label {
  flex: none;
  width: 116px;
  color: var(--text-faint);
  font-size: 11px;
}
.copy-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 11.5px;
}
.secret-warn {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 11px;
}
.modal-wide {
  width: min(620px, 100%);
}
.modal .form-grid {
  gap: 12px 14px;
}
.modal .modal-body .form-grid {
  padding: 0;
}

/* 账单摘要 */
.billing-summary {
  padding: 12px 16px 16px;
}
.billing-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.billing-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--text-dim);
}
.billing-row.total {
  margin-top: 4px;
  padding-top: 9px;
  border-top: 1px dashed var(--border);
  color: var(--text);
  font-size: 13px;
}
.billing-row.total strong {
  color: var(--accent);
  font-size: 16px;
}

/* 关联资源选择 */
.link-ref {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

@media (max-width: 980px) {
  .cards-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .search-input {
    width: 180px;
  }
  .nav-item .nav-count {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .cards-3 {
    grid-template-columns: 1fr;
  }
  .search-input {
    width: 100%;
  }
  .month-input {
    width: 100%;
  }
  .ops-actions {
    padding: 10px 12px 12px;
  }
  .copy-label {
    width: 90px;
  }
}

/* =========================================================
   v0.3 自动化执行 / 服务报告
   ========================================================= */
.playbook-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px 16px;
}
.playbook-empty {
  padding: 8px 0 10px;
}
.playbook-empty .empty-title {
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 600;
}
.playbook-empty .empty-hint {
  margin-top: 3px;
  color: var(--text-faint);
  font-size: 11px;
}
.run-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(6, 9, 15, 0.5);
}
.run-head-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.run-id {
  color: var(--text-dim);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.run-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--text-faint);
  font-size: 10.5px;
  font-family: var(--mono);
}
.run-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0 0 0 4px;
  list-style: none;
}
.run-step {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 0 0 13px 2px;
}
.run-step:last-child {
  padding-bottom: 2px;
}
.run-step::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 14px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}
.run-step:last-child::before {
  display: none;
}
.run-step-dot {
  width: 9px;
  height: 9px;
  margin-top: 4px;
  flex: none;
  border-radius: 50%;
  background: var(--idle);
  box-shadow: 0 0 0 3px rgba(125, 138, 160, 0.12);
}
.run-step-dot.running {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(245, 183, 78, 0.14);
  animation: pulse 1.6s infinite;
}
.run-step-dot.ok {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.14);
}
.run-step-dot.failed {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.14);
}
.run-step-main {
  min-width: 0;
  flex: 1;
}
.run-step-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 9px;
}
.run-step-label {
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}
.run-step-time {
  color: var(--text-faint);
  font-size: 10.5px;
  font-family: var(--mono);
}
.run-step-detail {
  margin-top: 2px;
  color: var(--text-dim);
  font-size: 11.5px;
  line-height: 1.55;
  word-break: break-word;
}
.run-error {
  padding: 9px 12px;
  border: 1px solid rgba(255, 107, 107, 0.32);
  border-radius: 8px;
  background: var(--danger-dim);
  color: #ffb3b3;
  font-size: 11.5px;
  line-height: 1.6;
  word-break: break-word;
}
.run-result {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
}
.run-result > .row-actions {
  align-self: flex-start;
}
.run-metrics {
  gap: 6px;
}
.run-checks {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.run-checks-title {
  color: var(--text-faint);
  font-size: 10.5px;
  letter-spacing: 0.5px;
}
.run-check-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.9fr) auto minmax(0, 2.4fr);
  gap: 8px;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid rgba(28, 37, 52, 0.5);
  font-size: 11.5px;
}
.run-check-row:last-child {
  border-bottom: none;
}
.run-check-label {
  color: var(--text-dim);
}
.run-check-detail {
  color: var(--text-faint);
  word-break: break-word;
}
.run-history {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 4px;
  border-top: 1px dashed var(--border);
}
.run-history-title {
  color: var(--text-faint);
  font-size: 10.5px;
}
.run-history-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 11px;
  color: var(--text-dim);
}

/* 报告列表（客户详情） */
.report-list {
  display: flex;
  flex-direction: column;
  padding: 4px 16px;
}
.report-list .empty {
  margin: 12px 0;
}
.report-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 10px 2px;
  border-bottom: 1px solid rgba(28, 37, 52, 0.62);
}
.report-row:last-child {
  border-bottom: none;
}
.report-row.clickable {
  cursor: pointer;
}
.report-row.clickable:hover {
  background: rgba(92, 200, 255, 0.05);
}
.report-row-main {
  min-width: 0;
  flex: 1;
}
.report-row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
}
.report-row-sub {
  margin-top: 2px;
  color: var(--text-faint);
  font-size: 10.5px;
  font-family: var(--mono);
}

/* 报告 markdown 渲染 */
.report-markdown-wrap {
  padding: 14px 18px 18px;
  min-width: 0;
}
.report-markdown {
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.75;
  word-break: break-word;
  min-width: 0;
}
.report-markdown > *:first-child {
  margin-top: 0;
}
.report-markdown h1,
.report-markdown h2,
.report-markdown h3,
.report-markdown h4 {
  margin: 18px 0 8px;
  color: var(--text);
  line-height: 1.35;
}
.report-markdown h1 {
  font-size: 19px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.report-markdown h2 {
  font-size: 15px;
}
.report-markdown h3,
.report-markdown h4 {
  font-size: 13px;
}
.report-markdown p {
  margin: 8px 0;
}
.report-markdown ul,
.report-markdown ol {
  margin: 8px 0;
  padding-left: 22px;
}
.report-markdown li {
  margin: 3px 0;
}
.report-markdown blockquote {
  margin: 10px 0;
  padding: 8px 14px;
  border-left: 3px solid var(--accent-2);
  border-radius: 0 6px 6px 0;
  background: rgba(124, 156, 255, 0.08);
  color: var(--text-dim);
}
.report-markdown code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #a8d8ff;
  font-family: var(--mono);
  font-size: 11.5px;
}
.report-markdown pre {
  margin: 10px 0;
  padding: 12px 14px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(6, 9, 15, 0.65);
}
.report-markdown pre code {
  padding: 0;
  background: transparent;
  color: var(--text-dim);
  font-size: 11.5px;
  line-height: 1.6;
}
.report-markdown hr {
  margin: 16px 0;
  border: none;
  border-top: 1px solid var(--border);
}
.report-markdown a {
  color: var(--accent);
}
.report-table-wrap {
  margin: 10px 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}
.report-table th {
  padding: 8px 11px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-dim);
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
.report-table td {
  padding: 7px 11px;
  border-bottom: 1px solid rgba(28, 37, 52, 0.62);
  color: var(--text-dim);
  vertical-align: top;
}
.report-table tr:last-child td {
  border-bottom: none;
}

/* 报告结构化摘要 */
.report-summary-wrap {
  padding: 4px 18px 16px;
}
.report-kv {
  display: grid;
  grid-template-columns: minmax(140px, 0.9fr) minmax(0, 2.4fr);
  gap: 6px 16px;
  font-size: 11.5px;
}
.report-kv-label {
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.report-kv-value {
  color: var(--text-dim);
  word-break: break-word;
}
.report-checks {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}
.report-checks-title {
  color: var(--text-faint);
  font-size: 10.5px;
}
.report-summary .empty {
  margin: 8px 0;
}

@media (max-width: 768px) {
  .run-check-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .run-check-detail {
    grid-column: 1 / -1;
  }
  .report-kv {
    grid-template-columns: 1fr;
    gap: 2px 0;
  }
  .report-kv-value {
    margin-bottom: 6px;
  }
  .report-markdown-wrap {
    padding: 12px;
  }
  .playbook-body {
    padding: 12px;
  }
}

/* =========================================================
   客户端接入指引（二维码 + 一键安装命令）
   ========================================================= */
.modal-guide {
  width: min(860px, 100%);
}
.enroll-guide {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.qr-box {
  width: 200px;
  height: 200px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.qr-box svg {
  width: 100%;
  height: 100%;
  display: block;
}
.qr-fallback {
  padding: 8px;
  color: #4a5568;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}
.qr-caption {
  color: var(--text-faint);
  font-size: 10.5px;
}
.guide-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.guide-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.guide-label {
  color: var(--text-faint);
  font-size: 10.5px;
  letter-spacing: 0.3px;
}
.guide-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.guide-url {
  flex: 1;
  min-width: 0;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(6, 9, 15, 0.55);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  word-break: break-all;
}
.guide-command-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(6, 9, 15, 0.62);
}
.guide-command {
  flex: 1;
  min-width: 0;
  margin: 0;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: normal;
}
.guide-command-box .copy-btn {
  flex: none;
  padding-top: 1px;
}
.guide-hint {
  color: var(--text-faint);
  font-size: 10.5px;
}
.guide-steps {
  margin: 2px 0 0;
  padding-left: 18px;
  color: var(--text-dim);
  font-size: 11.5px;
  line-height: 1.7;
}
.guide-steps li {
  margin: 3px 0;
}
.guide-note {
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  color: var(--text-faint);
  font-size: 10.5px;
  line-height: 1.6;
}
.enroll-warning {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 107, 107, 0.28);
  border-radius: 8px;
  background: var(--danger-dim);
  color: var(--text-dim);
  font-size: 12px;
}

@media (max-width: 768px) {
  .enroll-guide {
    grid-template-columns: 1fr;
  }
  .qr-wrap {
    margin-bottom: 2px;
  }
  .qr-box {
    width: 180px;
    height: 180px;
  }
}

/* =========================================================
   版本发布
   ========================================================= */
.version-dist {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 14px 16px 16px;
}
.version-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(6, 9, 15, 0.35);
}
.version-row.is-active {
  border-color: rgba(61, 220, 151, 0.28);
  background: var(--ok-dim);
}
.version-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
}
.version-name {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.version-count {
  color: var(--text-faint);
  font-size: 10.5px;
  font-family: var(--mono);
}
.version-bar {
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
}
.version-fill {
  height: 100%;
  min-width: 2px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width 0.25s ease;
}
.version-fill.is-active {
  background: linear-gradient(90deg, var(--ok), #78e8b5);
}
.table tbody tr.row-active td {
  background: rgba(61, 220, 151, 0.045);
}
.table tbody tr.row-active td:first-child {
  box-shadow: inset 2px 0 0 var(--ok);
}

@media (max-width: 768px) {
  .version-dist {
    padding: 12px;
  }
}

/* 节点版本列 */
.table .col-version {
  width: 122px;
  min-width: 104px;
  white-space: nowrap;
}

.table td.num {
  white-space: nowrap;
}

/* 接入指引系统切换 */
.os-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(6, 9, 15, 0.5);
  align-self: flex-start;
}
.os-tab {
  padding: 4px 11px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--text-faint);
  font-size: 11px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.os-tab:hover {
  color: var(--text);
}
.os-tab.active {
  border-color: rgba(92, 200, 255, 0.24);
  background: var(--accent-dim);
  color: var(--text);
}
.qr-os {
  color: var(--text-faint);
  font-size: 10px;
  letter-spacing: 0.2px;
}
.guide-windows-extra {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.guide-zip {
  align-self: flex-start;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px dashed var(--border);
  border-radius: 8px;
}

/* Windows 完整安装包入口 */
.windows-setup {
  display: flex;
  flex-direction: column;
}
.installer-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(92, 200, 255, 0.36);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(92, 200, 255, 0.14), rgba(124, 156, 255, 0.08));
}
.installer-cta-main {
  flex: 1;
  min-width: 0;
}
.installer-cta-title {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
}
.installer-cta-note {
  margin-top: 3px;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.55;
}
.installer-cta .btn {
  flex: none;
}

/* 钛核品牌标 */
.brand-mark{font-family:"Segoe UI","Microsoft YaHei UI",sans-serif !important;font-weight:800 !important;letter-spacing:0 !important}

/* 远程运维侧栏 */
.ops-section{padding-top:2px}
.ops-link{text-decoration:none}
.ops-section .side-title{margin-bottom:2px}

/* 演示数据提示 */
.mock-banner{display:flex;align-items:center;justify-content:center;gap:12px;padding:9px 16px;background:#fff7e6;border-bottom:1px solid #f2d9a6;color:#8a5a00;font-size:13px;position:relative;z-index:20}
.mock-banner button{border:1px solid #d9a441;background:#fff;color:#8a5a00;border-radius:7px;padding:5px 10px;font:inherit;cursor:pointer}
.mock-banner[hidden]{display:none}

/* 侧栏分组导航 */
.nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 2px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.nav-group:last-child { margin-bottom: 0; }
.nav-group-title { padding: 8px 10px 4px; color: var(--text-faint); font-size: 10.5px; letter-spacing: 1px; }

/* 顶部常用操作 */
.quick-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 28px;border-bottom:1px solid var(--border);background:var(--panel)}
.quick-label{font-size:11px;color:var(--text-faint);letter-spacing:1px;margin-right:2px}
.quick-actions a{font-size:12px;color:var(--text-dim);text-decoration:none;border:1px solid var(--border);border-radius:7px;padding:4px 9px;background:var(--panel-2)}
.quick-actions a:hover{color:var(--accent);border-color:var(--accent)}
@media (max-width:900px){.quick-actions{padding:8px 16px}.quick-label{display:none}}
