/* ==========================================================================
   翼卡 · 设计系统
   主题：深空蓝紫渐变 + 玻璃拟态，现代发卡网风格
   ========================================================================== */

:root {
  /* 品牌色 */
  --brand-50:  #eef4ff;
  --brand-100: #dbe7ff;
  --brand-200: #bfd3ff;
  --brand-300: #93b4ff;
  --brand-400: #6089ff;
  --brand-500: #3b66f5;
  --brand-600: #2547db;
  --brand-700: #1e37b0;
  --brand-800: #1e318b;
  --brand-900: #1e2f6e;
  --accent-400: #a78bfa;
  --accent-500: #8b5cf6;
  --accent-600: #7c3aed;

  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;

  /* 语义色 */
  --success-50:  #ecfdf5;
  --success-100: #d1fae5;
  --success-500: #10b981;
  --success-600: #059669;
  --success-700: #047857;

  --warn-50:  #fffbeb;
  --warn-100: #fef3c7;
  --warn-500: #f59e0b;
  --warn-600: #d97706;

  --danger-50:  #fef2f2;
  --danger-100: #fee2e2;
  --danger-500: #ef4444;
  --danger-600: #dc2626;
  --danger-700: #b91c1c;

  --info-50:  #eff6ff;
  --info-500: #3b82f6;

  /* 中性色 */
  --ink-50:  #f8fafc;
  --ink-100: #f1f5f9;
  --ink-200: #e2e8f0;
  --ink-300: #cbd5e1;
  --ink-400: #94a3b8;
  --ink-500: #64748b;
  --ink-600: #475569;
  --ink-700: #334155;
  --ink-800: #1e293b;
  --ink-900: #0f172a;
  --ink-950: #020617;

  /* 布局 */
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow:    0 4px 16px rgba(15, 23, 42, .08), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow-md: 0 8px 30px rgba(15, 23, 42, .10), 0 2px 8px rgba(15, 23, 42, .05);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, .14), 0 8px 20px rgba(15, 23, 42, .06);
  --shadow-brand: 0 10px 30px rgba(59, 102, 245, .28);

  --container: 1200px;
  --header-h: 68px;

  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ==========================================================================
   重置
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-800);
  background: var(--ink-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; line-height: 1.3; color: var(--ink-900); }
p { margin: 0; }
a { color: var(--brand-600); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--brand-500); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--brand-200); color: var(--brand-900); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-100); }
::-webkit-scrollbar-thumb { background: var(--ink-300); border-radius: 5px; border: 2px solid var(--ink-100); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-400); }

/* ==========================================================================
   布局工具
   ========================================================================== */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 760px; }
.container-mid { max-width: 960px; }

.flex { display: flex; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.gap-4 { gap: 16px; } .gap-5 { gap: 20px; } .gap-6 { gap: 24px; }

.grid { display: grid; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; } .mt-10 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.ml-auto { margin-left: auto; }
.w-full { width: 100%; }
.hidden { display: none !important; }

.text-xs { font-size: 12px; }
.text-sm { font-size: 13px; }
.text-base { font-size: 15px; }
.text-lg { font-size: 17px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; }
.text-3xl { font-size: 30px; }

.text-muted { color: var(--ink-500); }
.text-soft { color: var(--ink-400); }
.text-ink { color: var(--ink-900); }
.text-brand { color: var(--brand-600); }
.text-success { color: var(--success-600); }
.text-danger { color: var(--danger-600); }
.text-warn { color: var(--warn-600); }
.font-mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 价格 */
.price {
  color: var(--danger-600);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.price .unit { font-size: .62em; font-weight: 600; margin-right: 1px; }
.price-lg { font-size: 28px; }
.price-xl { font-size: 36px; }
.price-old {
  color: var(--ink-400);
  text-decoration: line-through;
  font-size: .8em;
  font-weight: 500;
  margin-left: 8px;
}

/* ==========================================================================
   按钮
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: all .18s var(--ease);
  position: relative;
  overflow: hidden;
  user-select: none;
}
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 102, 245, .25);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-brand);
}
.btn-primary:active { transform: translateY(0); }

.btn-accent {
  background: linear-gradient(135deg, var(--accent-500), var(--brand-600));
  color: #fff;
  box-shadow: 0 2px 8px rgba(139, 92, 246, .28);
}
.btn-accent:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 30px rgba(139, 92, 246, .35); }

.btn-success { background: var(--success-500); color: #fff; }
.btn-success:hover { background: var(--success-600); color: #fff; }

.btn-danger { background: var(--danger-500); color: #fff; }
.btn-danger:hover { background: var(--danger-600); color: #fff; }

.btn-warn { background: var(--warn-500); color: #fff; }
.btn-warn:hover { background: var(--warn-600); color: #fff; }

.btn-outline {
  background: #fff;
  border-color: var(--ink-200);
  color: var(--ink-700);
  box-shadow: var(--shadow-xs);
}
.btn-outline:hover {
  border-color: var(--brand-300);
  color: var(--brand-600);
  background: var(--brand-50);
}

.btn-ghost { background: transparent; color: var(--ink-600); }
.btn-ghost:hover { background: var(--ink-100); color: var(--ink-900); }

.btn-light { background: rgba(255,255,255,.16); color: #fff; backdrop-filter: blur(8px); }
.btn-light:hover { background: rgba(255,255,255,.26); color: #fff; }

.btn-white { background: #fff; color: var(--brand-700); box-shadow: var(--shadow); }
.btn-white:hover { color: var(--brand-600); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-lg { padding: 13px 28px; font-size: 15px; border-radius: var(--radius-lg); }
.btn-xl { padding: 16px 36px; font-size: 17px; border-radius: var(--radius-lg); }
.btn-sm { padding: 6px 13px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-xs { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }

.btn-group { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* ==========================================================================
   卡片 / 面板
   ========================================================================== */
.card {
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-pad { padding: 24px; }
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--ink-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(180deg, #fff, var(--ink-50));
}
.card-header h3 { font-size: 16px; }
.card-body { padding: 24px; }
.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--ink-200);
  background: var(--ink-50);
}
.card-hover { transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out), border-color .22s; }
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-200);
}

.panel {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 32px;
}

/* ==========================================================================
   玻璃拟态 / 渐变
   ========================================================================== */
.glass {
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, .5);
}

.gradient-brand { background: linear-gradient(135deg, var(--brand-600), var(--accent-600)); }
.gradient-text {
  background: linear-gradient(120deg, var(--brand-500), var(--accent-500), var(--cyan-500));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ==========================================================================
   徽章 / 标签
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.badge-primary { background: var(--brand-50); color: var(--brand-700); }
.badge-success { background: var(--success-50); color: var(--success-700); }
.badge-warn    { background: var(--warn-50);    color: var(--warn-600); }
.badge-danger  { background: var(--danger-50);  color: var(--danger-700); }
.badge-gray    { background: var(--ink-100);    color: var(--ink-600); }
.badge-info    { background: var(--info-50);    color: #1d4ed8; }
.badge-solid-success { background: var(--success-500); color: #fff; }
.badge-solid-danger  { background: var(--danger-500);  color: #fff; }
.badge-dot::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--ink-100);
  color: var(--ink-600);
}

/* ==========================================================================
   表单
   ========================================================================== */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  margin-bottom: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-700);
}
.form-label .req { color: var(--danger-500); margin-left: 2px; }
.form-hint { margin-top: 6px; font-size: 12.5px; color: var(--ink-500); line-height: 1.5; }
.form-error { margin-top: 6px; font-size: 12.5px; color: var(--danger-600); }

.input, .select, .textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--ink-200);
  border-radius: var(--radius);
  background: #fff;
  font-size: 14px;
  color: var(--ink-900);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s;
  outline: none;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-400); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-300); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(59, 102, 245, .12);
  background: #fff;
}
.input:disabled, .select:disabled, .textarea:disabled {
  background: var(--ink-100);
  color: var(--ink-500);
  cursor: not-allowed;
}
.textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.select { appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.input-lg { padding: 14px 16px; font-size: 15px; }
.input-group { display: flex; }
.input-group .input { border-radius: var(--radius) 0 0 var(--radius); }
.input-group .btn { border-radius: 0 var(--radius) var(--radius) 0; }

.input-affix { position: relative; }
.input-affix .affix {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  color: var(--ink-500);
  font-size: 14px;
  pointer-events: none;
}
.input-affix .affix-left { left: 14px; }
.input-affix .affix-right { right: 14px; }
.input-affix .has-left { padding-left: 38px; }
.input-affix .has-right { padding-right: 38px; }

.checkbox, .radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
}
.checkbox input, .radio input { width: 16px; height: 16px; accent-color: var(--brand-500); cursor: pointer; margin: 0; }

.help-text { font-size: 13px; color: var(--ink-500); line-height: 1.6; }
code, .code {
  padding: 2px 6px;
  background: var(--ink-100);
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em;
  color: var(--brand-700);
}

/* 卡密展示 */
.secret-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: linear-gradient(135deg, var(--ink-50), var(--brand-50));
  border: 1px dashed var(--brand-300);
  border-radius: var(--radius);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  word-break: break-all;
  transition: all .16s;
}
.secret-box:hover { border-color: var(--brand-500); background: var(--brand-50); }
.secret-box .secret-text { flex: 1; color: var(--ink-900); font-weight: 600; letter-spacing: .01em; }
.copy-btn {
  flex-shrink: 0;
  padding: 5px 11px;
  border: 1px solid var(--brand-300);
  border-radius: 7px;
  background: #fff;
  color: var(--brand-600);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .16s;
}
.copy-btn:hover { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }
.copy-btn.copied { background: var(--success-500); color: #fff; border-color: var(--success-500); }

/* ==========================================================================
   提示 / 空状态
   ========================================================================== */
.alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid transparent;
}
.alert-icon { flex-shrink: 0; font-size: 17px; line-height: 1.4; }
.alert-success { background: var(--success-50); border-color: #a7f3d0; color: var(--success-700); }
.alert-error   { background: var(--danger-50);  border-color: #fecaca; color: var(--danger-700); }
.alert-warn    { background: var(--warn-50);    border-color: #fde68a; color: var(--warn-600); }
.alert-info    { background: var(--info-50);    border-color: #bfdbfe; color: #1d4ed8; }

.empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--ink-500);
}
.empty-icon { font-size: 56px; margin-bottom: 16px; opacity: .55; line-height: 1; }
.empty-title { font-size: 16px; font-weight: 600; color: var(--ink-700); margin-bottom: 6px; }
.empty-desc { font-size: 13.5px; color: var(--ink-500); margin-bottom: 20px; }

/* ==========================================================================
   表格
   ========================================================================== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--ink-600);
  background: var(--ink-50);
  border-bottom: 1px solid var(--ink-200);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
.table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--ink-100);
  color: var(--ink-700);
  vertical-align: middle;
}
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--brand-50); }
.table tbody tr:last-child td { border-bottom: none; }
.table .num { font-variant-numeric: tabular-nums; text-align: right; }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ==========================================================================
   分页
   ========================================================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink-700);
  font-size: 14px;
  font-weight: 500;
  transition: all .16s;
}
.page-link:hover { border-color: var(--brand-400); color: var(--brand-600); background: var(--brand-50); }
.page-link.active {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 102, 245, .3);
}
.page-link.disabled { opacity: .4; pointer-events: none; }
.page-info { font-size: 13px; color: var(--ink-500); margin: 0 8px; }

/* ==========================================================================
   Toast 提示
   ========================================================================== */
.toast-wrap {
  position: fixed;
  top: 84px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 260px;
  max-width: 380px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--ink-300);
  font-size: 14px;
  animation: toastIn .32s var(--ease-out);
  pointer-events: auto;
}
.toast.success { border-left-color: var(--success-500); }
.toast.error   { border-left-color: var(--danger-500); }
.toast.warn    { border-left-color: var(--warn-500); }
.toast.info    { border-left-color: var(--info-500); }
.toast.hide { animation: toastOut .28s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px) scale(.96); } }

/* ==========================================================================
   动效
   ========================================================================== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulseGlow {
  0%,100% { box-shadow: 0 0 0 0 rgba(59,102,245,.45); }
  50%     { box-shadow: 0 0 0 12px rgba(59,102,245,0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 100% { transform: translateX(100%); } }

.animate-up { animation: fadeUp .5s var(--ease-out) both; }
.animate-in { animation: fadeIn .4s var(--ease) both; }
.delay-1 { animation-delay: .05s; } .delay-2 { animation-delay: .1s; }
.delay-3 { animation-delay: .15s; } .delay-4 { animation-delay: .2s; }
.delay-5 { animation-delay: .25s; } .delay-6 { animation-delay: .3s; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 768px) {
  body { font-size: 14px; }
  .container { padding: 0 16px; }
  .card-pad, .card-body { padding: 18px; }
  .panel { padding: 22px; }
  .btn-lg, .btn-xl { padding: 12px 22px; font-size: 15px; }
  .hide-mobile { display: none !important; }
  .toast-wrap { left: 16px; right: 16px; top: 76px; }
  .toast { min-width: 0; max-width: none; }
}
@media (min-width: 769px) {
  .show-mobile { display: none !important; }
}

/* ==========================================================================
   精致工具风 · 精修层（v2）
   --------------------------------------------------------------------------
   设计说明：
     原设计偏「玻璃拟态 + 大渐变」，视觉上偏营销页。
     本层将表面语言收敛为「浅色工具风」——白卡 + 中性画布 + 发丝描边，
     用更精细的边框、更克制的阴影、更明确的层次来表达质感。
     品牌蓝与圆角体系保持不变，避免影响已确认的配色。
   全部为追加覆盖，不删除任何既有类，保证 42 个模板零破坏。
   ========================================================================== */

:root {
  /* ---- 画布与表面（工具风核心）---- */
  --canvas:        #f6f7f9;   /* 页面底色：中性冷灰，比 ink-50 更“纸感” */
  --surface:       #ffffff;   /* 卡片表面 */
  --surface-sunken:#fafbfc;   /* 内凹区域（表头、代码块） */
  --surface-hover: #f8fafc;   /* hover 表面 */

  /* ---- 发丝描边（比 ink-200 更细腻）---- */
  --line:        #e8ebef;
  --line-strong: #d8dde4;
  --line-soft:   #f0f2f5;

  /* ---- 工具风圆角：整体收敛一档，更“精密” ---- */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  /* ---- 工具风阴影：更浅、更贴地，靠描边而非阴影造层次 ---- */
  --shadow-xs: 0 1px 1px rgba(16, 24, 40, .04);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow:    0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, .07), 0 1px 3px rgba(16, 24, 40, .05);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .10), 0 2px 8px rgba(16, 24, 40, .05);
  --shadow-brand: 0 4px 14px rgba(59, 102, 245, .22);

  /* ---- 焦点环（无障碍 + 工具风关键细节）---- */
  --focus-ring: 0 0 0 3px rgba(59, 102, 245, .16);
}

body {
  background: var(--canvas);
  /* 极淡的网格底纹：工具风的“工作台”暗示，几乎不可见但提升层次 */
  background-image:
    linear-gradient(rgba(16, 24, 40, .016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 24, 40, .016) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* 键盘焦点可见（鼠标点击不显示，工具风必备） */
:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- 卡片精修：白面 + 发丝边 + 极轻阴影 ---- */
.card {
  border-color: var(--line);
  box-shadow: var(--shadow);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
.card-header {
  background: var(--surface-sunken);
  border-bottom-color: var(--line);
  padding: 14px 20px;
}
.card-header h3 { font-size: 15px; letter-spacing: -.01em; }
.card-body { padding: 20px; }
.card-pad { padding: 20px; }
.card-footer {
  background: var(--surface-sunken);
  border-top: 1px solid var(--line);
}

/* 可交互卡片：hover 抬起 + 描边转品牌色，工具风的“可点性”提示 */
.card-hover:hover {
  border-color: var(--brand-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ---- 分层平面：用于需要“层面”感的区块 ---- */
.surface { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.surface-sunken { background: var(--surface-sunken); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.surface-raised { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }

/* ---- 分割线 ---- */
.divide { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---- 紧凑工具条：标签 + 数值，工具风常用 ---- */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.toolbar-label {
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  text-transform: uppercase; color: var(--ink-400);
}

/* ---- 键值对列表：工具风的元数据展示 ---- */
.kv { display: grid; gap: 1px; background: var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.kv-row {
  display: grid; grid-template-columns: 128px 1fr; gap: 16px;
  padding: 11px 16px; background: var(--surface); font-size: 13.5px;
}
.kv-key { color: var(--ink-500); }
.kv-val { color: var(--ink-900); font-weight: 500; word-break: break-all; }
@media (max-width: 560px) {
  .kv-row { grid-template-columns: 1fr; gap: 2px; }
  .kv-key { font-size: 12px; }
}

/* ---- 芯片 / 标签：工具风状态标识 ---- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; line-height: 1.6;
  background: var(--ink-100); color: var(--ink-600);
  border: 1px solid var(--line);
}
.chip-brand   { background: var(--brand-50);   color: var(--brand-700);   border-color: var(--brand-100); }
.chip-success { background: var(--success-50); color: var(--success-700); border-color: #bbf7d0; }
.chip-warn    { background: var(--warn-50);    color: var(--warn-600);    border-color: #fde68a; }
.chip-danger  { background: var(--danger-50);  color: var(--danger-700);  border-color: #fecaca; }

/* ---- 面板：比 card 更轻的分组容器 ---- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}

/* ---- 表格工具化：表头下沉、行 hover、末行去边 ---- */
.table thead th {
  background: var(--surface-sunken);
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  text-transform: uppercase; color: var(--ink-500);
  border-bottom: 1px solid var(--line-strong);
}
.table tbody tr { transition: background .12s var(--ease); }
.table tbody tr:hover { background: var(--surface-hover); }
.table td { border-bottom-color: var(--line-soft); }
.table tbody tr:last-child td { border-bottom: 0; }

/* ---- 输入控件：工具风的描边与聚焦反馈 ---- */
.input, .select, .textarea {
  border-color: var(--line-strong);
  background: var(--surface);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-300); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand-400);
  box-shadow: var(--focus-ring);
  outline: none;
}

/* ---- 区块标题：去掉装饰性色条，改用精确的字重与间距 ---- */
.section-title { letter-spacing: -.02em; }
.section-title .bar {
  width: 3px; height: 17px;
  border-radius: 2px;
  background: var(--brand-500);
  margin-right: 10px;
}

/* ---- 数字统一等宽，工具风的数据感 ---- */
.num, .stat-value, [data-count-to], .price, .font-mono {
  font-variant-numeric: tabular-nums;
}

/* ---- 提升层级语义：深色区块内文字保持可读 ---- */
.on-dark, .on-dark .text-muted { color: rgba(255, 255, 255, .78); }

/* ---- 滚动条与画布统一 ---- */
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink-300); border: 2px solid var(--canvas); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-400); }

