/* ==========================================================================
   Components · 按钮 / 表单 / 卡片 / 表格 / 弹层 / 反馈
   ========================================================================== */

/* ── 按钮 ─────────────────────────────────────────────────────────────── */
.btn {
  --btn-h: 36px;
  --btn-pad: 14px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--btn-h);
  padding: 0 var(--btn-pad);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 550;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.14s var(--ease), border-color 0.14s var(--ease),
    color 0.14s var(--ease), box-shadow 0.14s var(--ease), transform 0.06s var(--ease);
}
.btn:active:not(:disabled) { transform: translateY(0.5px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }

.btn-default {
  border-color: var(--border-strong);
  background: var(--surface);
  box-shadow: var(--sh-xs);
}
.btn-default:hover:not(:disabled) { background: var(--surface-3); border-color: var(--border-strong); }
.btn-default:active:not(:disabled) { background: var(--surface-3); }

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--sh-xs);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-primary:active:not(:disabled) { background: var(--primary-active); }

.btn-brand {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--sh-xs);
}
.btn-brand:hover:not(:disabled) { background: var(--brand-ink); }

.btn-ghost { color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }

.btn-soft {
  background: var(--surface-3);
  color: var(--text);
}
.btn-soft:hover:not(:disabled) { background: var(--border); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: var(--sh-xs);
}
.btn-danger:hover:not(:disabled) { filter: brightness(0.94); }

.btn-danger-ghost { color: var(--danger); border-color: var(--danger-line); background: var(--surface); }
.btn-danger-ghost:hover:not(:disabled) { background: var(--danger-soft); }

.btn-sm { --btn-h: 30px; --btn-pad: 10px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn-sm svg { width: 13px; height: 13px; }
.btn-lg { --btn-h: 44px; --btn-pad: 20px; font-size: 14.5px; border-radius: var(--r-md); }
.btn-block { width: 100%; }
.btn-icon { --btn-pad: 0; width: var(--btn-h); flex: none; }

/* loading 态：保留占位、内容透明、中间转圈 */
.btn.is-loading { pointer-events: none; color: transparent !important; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1.8px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: var(--on-primary);
  animation: spin 0.6s linear infinite;
}
.btn-default.is-loading::after,
.btn-ghost.is-loading::after,
.btn-soft.is-loading::after,
.btn-danger-ghost.is-loading::after { color: var(--text-2); }
.btn.is-loading::before { content: ""; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── 表单 ─────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 560;
  color: var(--text-2);
}
.field-label .req { color: var(--danger); }
.field-hint { font-size: 11.5px; color: var(--text-3); line-height: 1.5; }
.field-error {
  display: none;
  font-size: 11.5px;
  color: var(--danger);
  line-height: 1.5;
}
.field.has-error .field-error { display: block; }

.input,
.select,
.textarea {
  width: 100%;
  height: var(--field-h);
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color 0.14s var(--ease), box-shadow 0.14s var(--ease),
    background-color 0.14s var(--ease);
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover:not(:disabled), .select:hover:not(:disabled), .textarea:hover:not(:disabled) {
  border-color: var(--text-3);
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: var(--ring);
}
.input:disabled, .select:disabled, .textarea:disabled {
  background: var(--surface-3);
  color: var(--text-3);
  cursor: not-allowed;
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"] {
  border-color: var(--danger);
}
.input[aria-invalid="true"]:focus, .textarea[aria-invalid="true"]:focus {
  box-shadow: var(--ring-danger);
}

.textarea {
  height: auto;
  min-height: 92px;
  padding: 10px 12px;
  line-height: 1.6;
  resize: vertical;
}

.select {
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a92a2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  cursor: pointer;
}

.input-group { position: relative; display: flex; align-items: center; }
.input-group .input { padding-right: 44px; }
.input-group .input-affix {
  position: absolute;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  color: var(--text-3);
  transition: color 0.14s, background-color 0.14s;
}
.input-group .input-affix:hover { color: var(--text); background: var(--surface-3); }
.input-group .input-affix svg { width: 15px; height: 15px; }

.input-mono { font-family: var(--font-mono); letter-spacing: 0.04em; }

/* 复选框 / 单选 */
.check {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}
.check input {
  appearance: none;
  flex: none;
  width: 16px; height: 16px;
  margin: 1.5px 0 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s;
  position: relative;
}
.check input[type="radio"] { border-radius: 50%; }
.check input:hover { border-color: var(--text-3); }
.check input:checked { background: var(--primary); border-color: var(--primary); }
.check input:checked::after {
  content: "";
  position: absolute;
  left: 4.5px; top: 1.2px;
  width: 4px; height: 8px;
  border: solid var(--on-primary);
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(43deg);
}
.check input[type="radio"]:checked::after {
  left: 4px; top: 4px;
  width: 4px; height: 4px;
  border: 0;
  border-radius: 50%;
  background: var(--on-primary);
  transform: none;
}
.check a { text-decoration: underline; text-underline-offset: 2px; }

/* 开关 */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 36px; height: 21px;
  flex: none;
  border-radius: var(--r-full);
  background: var(--border-strong);
  cursor: pointer;
  transition: background-color 0.18s var(--ease);
  border: 0;
}
.switch::after {
  content: "";
  position: absolute;
  left: 2px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s var(--ease);
}
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"]::after { transform: translateX(15px); }
.switch:disabled { opacity: 0.45; cursor: not-allowed; }
.switch:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* 密码强度 */
.strength { display: flex; gap: 4px; margin-top: 2px; }
.strength-bar {
  height: 4px;
  flex: 1;
  border-radius: var(--r-full);
  background: var(--border);
  transition: background-color 0.2s var(--ease);
}
.strength-bar.on-weak { background: var(--danger); }
.strength-bar.on-fair { background: var(--warn); }
.strength-bar.on-good { background: #3f8fd0; }
.strength-bar.on-strong { background: var(--ok); }

/* ── 卡片 ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
}
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-faint);
}
.card-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.card-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; line-height: 1.5; }
.card-body { padding: 18px; }
.card-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--border-faint);
  background: var(--surface-2);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.card-flush { padding: 0; }

/* 指标卡 */
.stat {
  position: relative;
  padding: 16px 18px 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-label {
  font-size: 12px;
  font-weight: 550;
  color: var(--text-2);
  letter-spacing: 0.01em;
}
.stat-value {
  font-size: 28px;
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.stat-value small { font-size: 12.5px; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.stat-foot { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 5px; }
.stat-icon {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  color: var(--text-2);
}
.stat-icon svg { width: 15px; height: 15px; }

/* ── 徽标 ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 21px;
  padding: 0 7px;
  border-radius: var(--r-sm);
  font-size: 11.5px;
  font-weight: 550;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  background: var(--surface-3);
  color: var(--text-2);
}
.badge svg { width: 11px; height: 11px; }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }
.badge-brand { background: var(--brand-soft); color: var(--brand-ink); border-color: var(--brand-line); }
.badge-plain { background: transparent; border-color: var(--border); color: var(--text-2); }
.badge-dot::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-xs);
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 500;
}

/* 头像 */
.avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  flex: none;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  user-select: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 28px; height: 28px; font-size: 11.5px; }
.avatar-lg { width: 48px; height: 48px; font-size: 17px; }
.avatar-ring { box-shadow: 0 0 0 1px var(--border); }

/* ── 表格 ─────────────────────────────────────────────────────────────── */
.table-wrap { width: 100%; overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 9px 14px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 560;
  letter-spacing: 0.02em;
  color: var(--text-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-faint);
  vertical-align: middle;
}
.table tbody tr { transition: background-color 0.12s var(--ease); }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .cell-actions { text-align: right; white-space: nowrap; }
.table .num { font-variant-numeric: tabular-nums; }

/* 行内菜单 */
.menu {
  position: absolute;
  z-index: 60;
  min-width: 172px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-md);
  animation: pop 0.12s var(--ease);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 9px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text);
  text-align: left;
  transition: background-color 0.1s;
}
.menu-item svg { width: 14px; height: 14px; color: var(--text-3); }
.menu-item:hover { background: var(--surface-3); }
.menu-item.is-danger { color: var(--danger); }
.menu-item.is-danger svg { color: var(--danger); }
.menu-item:disabled { opacity: 0.45; cursor: not-allowed; }
.menu-sep { height: 1px; margin: 4px 2px; background: var(--border-faint); }

@keyframes pop {
  from { opacity: 0; transform: translateY(-3px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

/* ── Tabs ─────────────────────────────────────────────────────────────── */
.tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface-3);
  border-radius: var(--r-md);
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 520;
  color: var(--text-2);
  transition: background-color 0.14s, color 0.14s, box-shadow 0.14s;
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--sh-xs);
}
.tab svg { width: 14px; height: 14px; }
.tab .count {
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.tabs-line {
  display: flex;
  gap: 20px;
  background: none;
  padding: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}
.tabs-line .tab {
  height: 38px;
  padding: 0 2px;
  border-radius: 0;
  background: none !important;
  box-shadow: none !important;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: 13px;
}
.tabs-line .tab[aria-selected="true"] {
  color: var(--text);
  border-bottom-color: var(--text);
  font-weight: 600;
}

/* ── 弹层 ─────────────────────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 12, 16, 0.44);
  backdrop-filter: blur(3px);
  animation: fade 0.16s var(--ease);
}
@keyframes fade { from { opacity: 0; } }

.modal {
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  animation: modal-in 0.2s var(--ease);
  overflow: hidden;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: none; }
}
.modal-lg { max-width: 620px; }
.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px 0;
}
.modal-icon {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--surface-3);
  color: var(--text-2);
}
.modal-icon.is-danger { background: var(--danger-soft); color: var(--danger); }
.modal-icon.is-warn { background: var(--warn-soft); color: var(--warn); }
.modal-icon.is-ok { background: var(--ok-soft); color: var(--ok); }
.modal-icon svg { width: 17px; height: 17px; }
.modal-title { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.modal-desc { margin-top: 4px; font-size: 13px; color: var(--text-2); line-height: 1.6; }
.modal-body { padding: 16px 20px; overflow-y: auto; }
.modal-head + .modal-body { padding-top: 14px; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px 18px;
}
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  color: var(--text-3);
}
.modal-close:hover { background: var(--surface-3); color: var(--text); }
.modal-relative { position: relative; }

/* 抽屉 */
.overlay-right { place-items: stretch; justify-items: end; padding: 0; }
.drawer {
  width: 100%;
  max-width: 560px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--sh-lg);
  animation: drawer-in 0.22s var(--ease);
}
@keyframes drawer-in { from { transform: translateX(18px); opacity: 0.6; } }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-faint);
}
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.drawer-foot { padding: 14px 20px; border-top: 1px solid var(--border-faint); background: var(--surface-2); }

/* ── Toast ────────────────────────────────────────────────────────────── */
.toast-host {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: min(380px, calc(100vw - 32px));
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-md);
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  pointer-events: auto;
  animation: toast-in 0.18s var(--ease);
}
.toast.is-out { animation: toast-out 0.16s var(--ease) forwards; }
.toast svg { width: 15px; height: 15px; margin-top: 1px; flex: none; }
.toast-ok svg { color: var(--ok); }
.toast-err svg { color: var(--danger); }
.toast-info svg { color: var(--info); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-6px); } }

/* ── 骨架 / 空态 / 提示条 ─────────────────────────────────────────────── */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface-3);
  border-radius: var(--r-sm);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: shimmer 1.4s infinite;
}
:root[data-theme="night"] .skeleton::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
}
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-line { height: 12px; }
.sk-title { height: 16px; width: 40%; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 44px 24px;
  text-align: center;
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  margin-bottom: 6px;
  border-radius: var(--r-lg);
  background: var(--surface-3);
  color: var(--text-3);
}
.empty-icon svg { width: 21px; height: 21px; }
.empty-title { font-size: 14px; font-weight: 600; }
.empty-desc { font-size: 12.5px; color: var(--text-3); max-width: 320px; line-height: 1.6; }
.empty .btn { margin-top: 10px; }

.banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13px;
  line-height: 1.6;
}
.banner svg { width: 16px; height: 16px; margin-top: 1px; flex: none; }
.banner-title { font-weight: 600; }
.banner-danger { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger); }
.banner-warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.banner-info { background: var(--info-soft); border-color: var(--border); color: var(--info); }
.banner-ok { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }

.inline-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
}
.inline-note svg { width: 13px; height: 13px; }

/* 代码 / 激活码明文 */
.code-list {
  max-height: 260px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-inset);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.9;
  letter-spacing: 0.03em;
  user-select: all;
}
.code-list div { display: flex; justify-content: space-between; gap: 12px; }
.code-list .idx { color: var(--text-3); user-select: none; }

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--r-xs);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-2);
}

/* 分隔 */
.divider { height: 1px; background: var(--border-faint); }
.divider-label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-3);
  font-size: 11.5px;
}
.divider-label::before, .divider-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* 定义列表（信息展示行） */
.kv { display: flex; flex-direction: column; }
.kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-faint);
  font-size: 13px;
  min-height: 40px;
}
.kv-row:last-child { border-bottom: 0; }
.kv-key { color: var(--text-2); flex: none; }
.kv-val { text-align: right; font-weight: 500; min-width: 0; }

/* 进度/时间线 */
.timeline { position: relative; padding-left: 20px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--border);
}
.timeline-item { position: relative; padding: 0 0 16px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -19px; top: 5px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
}
.timeline-item.is-ok::before { border-color: var(--ok); background: var(--ok); }
.timeline-item.is-err::before { border-color: var(--danger); background: var(--danger); }

/* avatar: fallback 与 img 同格，img 失败时隐藏自身露出 fallback */
.avatar > img, .avatar > .avatar-fb { grid-area: 1 / 1; }
.avatar .avatar-fb { display: none; }
