/* ============================================================
   正好工具箱 · 统一设计系统（浅色精致 / 零外部依赖）
   仅使用系统字体与原生 CSS，不加载任何外部资源
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f5f7fc;
  --bg-grid: rgba(15, 23, 42, .022);
  --surface: rgba(255, 255, 255, .82);
  --surface-solid: #ffffff;
  --surface-2: #f7f9fd;
  --surface-3: #eef2f9;
  --border: #e2e8f2;
  --border-strong: #cbd5e6;
  --text: #0d1526;
  --text-2: #334155;
  --dim: #64748b;
  --faint: #94a3b8;
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --brand-3: #0891b2;
  --brand-soft: rgba(79, 70, 229, .09);
  --success: #059669;
  --success-soft: rgba(5, 150, 105, .10);
  --warn: #b45309;
  --warn-soft: rgba(180, 83, 9, .10);
  --error: #dc2626;
  --error-soft: rgba(220, 38, 38, .08);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(13, 21, 38, .05), 0 1px 3px rgba(13, 21, 38, .04);
  --shadow-md: 0 10px 30px -14px rgba(13, 21, 38, .22), 0 3px 10px rgba(13, 21, 38, .05);
  --shadow-lg: 0 24px 60px -20px rgba(13, 21, 38, .28), 0 6px 18px rgba(13, 21, 38, .06);
  --ring: 0 0 0 3px rgba(79, 70, 229, .13);
  --mono: ui-monospace, "Cascadia Code", "Cascadia Mono", "JetBrains Mono", "SFMono-Regular", Consolas, "Fira Code", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  color: var(--text);
  background: transparent;
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(79, 70, 229, .18); color: var(--text); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #cfd8e6;
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: #aebbcf; background-clip: padding-box; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: #4338ca; }

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- 背景层：柔和光斑 + 细网格 ---------- */
.z-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(680px 420px at 10% -12%, rgba(99, 102, 241, .14), transparent 62%),
    radial-gradient(600px 420px at 94% -6%, rgba(6, 182, 212, .11), transparent 62%),
    radial-gradient(760px 560px at 50% 112%, rgba(168, 85, 247, .09), transparent 62%),
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: auto, auto, auto, 26px 26px, 26px 26px;
}
.z-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .35), transparent 30%);
}

#app,
.z-app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- 顶部栏 ---------- */
.z-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(18px) saturate(1.7);
  -webkit-backdrop-filter: blur(18px) saturate(1.7);
  border-bottom: 1px solid rgba(226, 232, 242, .9);
}

.z-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 11px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
}

.z-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all .18s ease;
  flex-shrink: 0;
}
.z-back:hover {
  color: var(--brand);
  border-color: rgba(79, 70, 229, .35);
  box-shadow: 0 4px 14px -6px rgba(79, 70, 229, .4);
  transform: translateX(-2px);
}
.z-back svg { width: 14px; height: 14px; }

.z-header-sep { width: 1px; height: 24px; background: var(--border); flex-shrink: 0; }

.z-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.5px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 18px -8px rgba(79, 70, 229, .7), inset 0 1px 0 rgba(255, 255, 255, .35);
  flex-shrink: 0;
  overflow: hidden;
}
.z-mark svg { width: 20px; height: 20px; }

.z-head-text { min-width: 0; }
.z-head-text h1 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.35px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.z-head-text p {
  font-size: 11.5px;
  color: var(--dim);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.z-head-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.z-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--dim);
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .7);
  white-space: nowrap;
}

/* ---------- 主体 ---------- */
.z-main {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 24px 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.z-main-wide { max-width: 1420px; }
.z-main-narrow { max-width: 920px; }

.z-footer {
  text-align: center;
  padding: 16px 24px 22px;
  font-size: 11.5px;
  color: var(--faint);
  line-height: 1.9;
  position: relative;
  z-index: 1;
}
.z-footer b { color: var(--dim); font-weight: 600; }
.z-footer .z-dot { margin: 0 7px; opacity: .5; }

/* ---------- 工具栏 ---------- */
.z-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 5;
}
.z-toolbar-flat { background: transparent; border: none; box-shadow: none; padding: 0; backdrop-filter: none; }
.z-group { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.z-divider { width: 1px; height: 22px; background: var(--border); margin: 0 3px; flex-shrink: 0; }
.z-spacer { flex: 1; }
.z-tool-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 0 3px;
  white-space: nowrap;
}

/* ---------- 按钮 ---------- */
.z-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
  user-select: none;
}
.z-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.z-btn:hover:not(:disabled) {
  color: var(--brand);
  border-color: rgba(79, 70, 229, .32);
  background: #fbfbff;
  box-shadow: 0 6px 16px -8px rgba(79, 70, 229, .45);
  transform: translateY(-1px);
}
.z-btn:active:not(:disabled) { transform: translateY(0) scale(.985); }
.z-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.z-btn-primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 18px -8px rgba(79, 70, 229, .8), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.z-btn-primary:hover:not(:disabled) {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #4338ca, #6d28d9);
  box-shadow: 0 12px 26px -10px rgba(79, 70, 229, .9);
  transform: translateY(-1px);
}
.z-btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--dim); }
.z-btn-ghost:hover:not(:disabled) { background: var(--brand-soft); color: var(--brand); border-color: transparent; box-shadow: none; }
.z-btn-danger { color: var(--error); border-color: rgba(220, 38, 38, .22); background: rgba(255, 255, 255, .9); }
.z-btn-danger:hover:not(:disabled) { color: #b91c1c; background: var(--error-soft); border-color: rgba(220, 38, 38, .4); box-shadow: 0 6px 16px -8px rgba(220, 38, 38, .4); }
.z-btn-sm { height: 28px; padding: 0 10px; font-size: 11.5px; border-radius: 8px; }
.z-btn-xs { height: 24px; padding: 0 8px; font-size: 11px; border-radius: 7px; gap: 4px; }
.z-btn-xs svg { width: 12px; height: 12px; }
.z-btn-icon { width: 34px; padding: 0; }
.z-btn-icon.z-btn-sm { width: 28px; }
.z-btn-icon.z-btn-xs { width: 24px; }

.z-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .16s ease;
}
.z-icon-btn svg { width: 15px; height: 15px; }
.z-icon-btn:hover { background: var(--brand-soft); color: var(--brand); }

/* ---------- 表单 ---------- */
.z-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.z-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 6px;
}
.z-input,
.z-select,
.z-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-solid);
  color: var(--text);
  padding: 8px 11px;
  font-size: 13px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
  box-shadow: 0 1px 1px rgba(13, 21, 38, .025) inset;
}
.z-input::placeholder,
.z-textarea::placeholder { color: var(--faint); }
.z-input:focus,
.z-select:focus,
.z-textarea:focus { border-color: rgba(79, 70, 229, .55); box-shadow: var(--ring); background: #fff; }
.z-select { cursor: pointer; appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.z-textarea { resize: vertical; line-height: 1.65; font-family: var(--mono); font-size: 12.5px; }
.z-input-mono { font-family: var(--mono); font-size: 12.5px; }
.z-input-sm { padding: 5px 9px; font-size: 12px; border-radius: 7px; }

.z-chk {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
  padding: 4px 2px;
  white-space: nowrap;
}
.z-chk input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }

.z-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.z-switch input { display: none; }
.z-switch i {
  width: 34px;
  height: 19px;
  border-radius: 999px;
  background: #d7deea;
  position: relative;
  transition: background .2s ease;
  flex-shrink: 0;
}
.z-switch i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(13, 21, 38, .25);
  transition: transform .2s cubic-bezier(.34, 1.4, .64, 1);
}
.z-switch input:checked + i { background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.z-switch input:checked + i::after { transform: translateX(15px); }

.z-range { width: 100%; accent-color: var(--brand); cursor: pointer; height: 4px; }

/* ---------- 分段控件 ---------- */
.z-seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.z-seg button {
  height: 26px;
  padding: 0 11px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--dim);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .16s ease;
  white-space: nowrap;
}
.z-seg button:hover { color: var(--brand); }
.z-seg button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 3px 9px -3px rgba(79, 70, 229, .65);
}

/* ---------- 工作台 / 面板 ---------- */
.z-workbench {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  min-height: 440px;
}
.z-workbench-3 { grid-template-columns: 1fr 1fr 1fr; }
.z-workbench-wide-left { grid-template-columns: 1.35fr 1fr; }

.z-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: relative;
}
.z-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9), transparent);
  pointer-events: none;
}
.z-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 13px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .6);
  min-height: 42px;
}
.z-panel-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.z-panel-title::before {
  content: "";
  width: 3px;
  height: 13px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
}
.z-panel-meta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.z-panel-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  position: relative;
}
.z-panel-foot {
  padding: 8px 13px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, .5);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.z-editor {
  width: 100%;
  height: 100%;
  min-height: 260px;
  border: none;
  outline: none;
  background: transparent;
  padding: 13px 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  resize: none;
  tab-size: 2;
  color: var(--text);
}
.z-editor::placeholder { color: var(--faint); }
.z-editor-mono-lg { font-size: 13px; }

.z-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-md);
  padding: 16px;
}
.z-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 12px;
}
.z-card-title svg { width: 15px; height: 15px; color: var(--brand); }

/* ---------- 徽章 / 状态 ---------- */
.z-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .01em;
  background: var(--brand-soft);
  color: var(--brand);
  white-space: nowrap;
}
.z-badge-new { background: linear-gradient(135deg, rgba(6, 182, 212, .16), rgba(79, 70, 229, .16)); color: #0e7490; }
.z-badge-ok { background: var(--success-soft); color: var(--success); }
.z-badge-err { background: var(--error-soft); color: var(--error); }
.z-badge-warn { background: var(--warn-soft); color: var(--warn); }
.z-badge-mono { font-family: var(--mono); font-weight: 600; }

.z-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--dim);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.z-chip b { color: var(--text-2); font-weight: 700; }

.z-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.z-dot.ok { background: var(--success); box-shadow: 0 0 0 3px rgba(5, 150, 105, .14); }
.z-dot.err { background: var(--error); box-shadow: 0 0 0 3px rgba(220, 38, 38, .13); }
.z-dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(180, 83, 9, .13); }

/* ---------- 提示 / 空状态 ---------- */
.z-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 13px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--text-2);
}
.z-alert-err { background: var(--error-soft); border-color: rgba(220, 38, 38, .22); color: #b91c1c; }
.z-alert-ok { background: var(--success-soft); border-color: rgba(5, 150, 105, .22); color: #047857; }
.z-alert-warn { background: var(--warn-soft); border-color: rgba(180, 83, 9, .2); color: var(--warn); }
.z-alert-code { font-family: var(--mono); font-size: 11.5px; }

.z-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 20px;
  text-align: center;
  color: var(--faint);
  font-size: 12.5px;
  min-height: 180px;
}
.z-empty svg { width: 34px; height: 34px; opacity: .45; }

/* ---------- 键盘键 ---------- */
.z-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  background: var(--surface-solid);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 1px 0 rgba(13, 21, 38, .04);
}
.z-kbd-dark { background: var(--surface-3); }

/* ---------- Toast ---------- */
.z-toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 16px);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(460px, calc(100vw - 40px));
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(5, 150, 105, .25);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .24s cubic-bezier(.34, 1.4, .64, 1);
}
.z-toast::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, .14);
  flex-shrink: 0;
}
.z-toast.show { opacity: 1; transform: translate(-50%, 0); }
.z-toast[data-type="error"] { border-color: rgba(220, 38, 38, .25); }
.z-toast[data-type="error"]::before { background: var(--error); box-shadow: 0 0 0 3px rgba(220, 38, 38, .13); }
.z-toast[data-type="info"] { border-color: rgba(79, 70, 229, .25); }
.z-toast[data-type="info"]::before { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* ---------- 弹窗 ---------- */
.z-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(13, 21, 38, .42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: z-fade .16s ease both;
}
.z-modal-card {
  width: min(720px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--surface-solid);
  box-shadow: var(--shadow-lg);
  animation: z-modal-in .24s cubic-bezier(.34, 1.25, .64, 1) both;
  overflow: hidden;
}
.z-modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 17px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 800;
}
.z-modal-body { padding: 15px 17px; overflow: auto; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.z-modal-foot { padding: 11px 17px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.z-modal-close { margin-left: auto; }

/* ---------- 表格 ---------- */
.z-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.z-table th {
  text-align: left;
  padding: 8px 11px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .6);
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(10px);
}
.z-table td { padding: 8px 11px; border-bottom: 1px solid rgba(226, 232, 242, .65); vertical-align: top; }
.z-table tbody tr:hover td { background: rgba(79, 70, 229, .035); }
.z-table tbody tr:last-child td { border-bottom: none; }
.z-table .z-mono { font-size: 12px; }

.z-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border-bottom: 1px solid rgba(226, 232, 242, .7);
  transition: background .14s ease;
}
.z-list-row:last-child { border-bottom: none; }
.z-list-row:hover { background: rgba(79, 70, 229, .035); }

/* ---------- 文本工具类 ---------- */
.z-mono { font-family: var(--mono); font-size: 12.5px; }
.z-num { font-variant-numeric: tabular-nums; }
.z-dim { color: var(--dim); }
.z-faint { color: var(--faint); }
.z-strong { font-weight: 700; color: var(--text); }
.z-wrap-all { word-break: break-all; }
.z-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.z-grad-text {
  background: linear-gradient(115deg, var(--brand) 5%, var(--brand-2) 45%, var(--brand-3) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.z-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.z-col { display: flex; flex-direction: column; gap: 9px; }
.z-grow { flex: 1; min-width: 0; }
.z-nowrap { white-space: nowrap; }
.z-scroll { overflow: auto; min-height: 0; }
.z-hidden { display: none !important; }
.z-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

.z-code-inline {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--brand);
}
.z-kv { display: grid; grid-template-columns: 120px 1fr; gap: 7px 12px; align-items: baseline; }
.z-kv dt { font-size: 11.5px; color: var(--faint); }
.z-kv dd { margin: 0; font-family: var(--mono); font-size: 12.5px; word-break: break-all; }

.z-result-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  font-family: var(--mono);
  font-size: 12.5px;
  word-break: break-all;
}
.z-result-line .z-grow { font-family: var(--mono); }

.z-copy {
  border: none;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  padding: 3px 4px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
  flex-shrink: 0;
}
.z-copy:hover { color: var(--brand); background: var(--brand-soft); }
.z-copy svg { width: 14px; height: 14px; }

/* ---------- 动效 ---------- */
@keyframes z-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes z-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes z-modal-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes z-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.z-rise { animation: z-rise .4s cubic-bezier(.22, 1, .36, 1) both; }
.z-pulse { animation: z-pulse 2s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .z-workbench, .z-workbench-3, .z-workbench-wide-left { grid-template-columns: 1fr; min-height: 0; }
  .z-main { padding: 14px 16px 24px; }
  .z-header-inner { padding: 10px 16px; }
  .z-panel { min-height: 280px; }
  .z-main .z-workbench { min-height: 0; }
}

@media (max-width: 640px) {
  .z-header-inner { flex-wrap: wrap; min-height: 58px; gap: 8px; }
  .z-head-right { width: 100%; margin-left: 0; justify-content: flex-start; }
  .z-head-text h1 { font-size: 15.5px; }
  .z-back span { display: none; }
  .z-back { width: 34px; padding: 0; justify-content: center; }
  .z-header-sep { display: none; }
  .z-toolbar { padding: 8px; }
  .z-kv { grid-template-columns: 96px 1fr; }
  .z-modal { padding: 10px; }
}