/* pm-platform 管理后台样式 */

:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-2: #fbfbfd;
  --border: #e7e9ee;
  --border-strong: #d7dae2;
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --muted-2: #66707f;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-soft: #eef2ff;
  --danger: #e11d48;
  --danger-soft: #fff1f2;
  --ok: #059669;
  --ok-soft: #ecfdf5;
  --warn: #d97706;
  --warn-soft: #fffbeb;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 16px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, 0.24);
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar: 236px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

[hidden] { display: none !important; }

/* ---------------------------------------------------------------- 登录页 */

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 15% -10%, #e0e7ff 0%, transparent 55%),
    radial-gradient(900px 500px at 95% 10%, #dbeafe 0%, transparent 50%),
    var(--bg);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 34px 32px 28px;
  box-shadow: var(--shadow-lg);
}

.brand-lg {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #6366f1, #4338ca);
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.5px;
  font-size: 15px;
  box-shadow: 0 6px 14px -4px rgba(79, 70, 229, 0.55);
  flex: none;
}

.brand-text b { display: block; font-size: 16px; letter-spacing: -0.2px; }
.brand-text span { color: var(--muted); font-size: 12px; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.field .hint { font-size: 12px; color: var(--muted-2); margin-top: 5px; }

input[type="text"], input[type="password"], input[type="search"], input[type="number"],
select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.6; }
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.13);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, color 0.14s, transform 0.06s;
  white-space: nowrap;
}
.btn:hover { background: #f8f9fb; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.4);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { filter: brightness(0.95); }
.btn-danger { background: #fff; border-color: #fecdd3; color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: rgba(16, 24, 40, 0.05); }
.btn-block { width: 100%; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }

.alert {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 14px;
}
.alert-error { background: var(--danger-soft); color: #a1123a; border: 1px solid #fecdd3; }

/* ----------------------------------------------------------------- 布局 */

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

.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar .brand-lg { margin: 0 6px 4px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  text-transform: uppercase;
  padding: 8px 10px 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border: 0;
  background: transparent;
  text-align: left;
  width: 100%;
}
.nav-item:hover { background: #f4f5f8; }
.nav-item.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.nav-item .count {
  margin-left: auto;
  font-size: 11.5px;
  background: #eceef3;
  color: #475467;
  border-radius: 20px;
  padding: 1px 7px;
  font-weight: 600;
}
.nav-item.active .count { background: #dfe3ff; color: var(--primary-dark); }
.nav-item svg { flex: none; opacity: 0.85; }

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #818cf8, #4f46e5);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex: none;
}
.sidebar-footer .who { min-width: 0; }
.sidebar-footer .who b { display: block; font-size: 13px; }
.sidebar-footer .who span { font-size: 11.5px; color: var(--muted); }
.icon-btn {
  border: 0; background: transparent; cursor: pointer; padding: 6px;
  border-radius: 8px; color: var(--muted); display: grid; place-items: center;
}
.icon-btn:hover { background: #f1f2f6; color: var(--ink); }

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

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 28px;
  background: rgba(246, 247, 249, 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 17px; margin: 0; letter-spacing: -0.2px; }
.topbar .sub { color: var(--muted); font-size: 12.5px; }
.topbar .spacer { flex: 1; }

.view { padding: 22px 28px 60px; max-width: 1280px; width: 100%; }

/* ----------------------------------------------------------------- 卡片 */

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 16px; }
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.card-head h2 { font-size: 14.5px; margin: 0; }
.card-head .spacer { flex: 1; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }

.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color 0.14s, transform 0.1s, box-shadow 0.14s;
}
.stat:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; margin-top: 2px; }
.stat .dot { width: 7px; height: 7px; border-radius: 50%; }

/* ----------------------------------------------------------------- 徽章 */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-slate { background: #f1f3f7; color: #475467; border-color: #e4e7ec; }
.badge-blue { background: #eff6ff; color: #1d4ed8; border-color: #dbeafe; }
.badge-amber { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.badge-violet { background: #f5f3ff; color: #6d28d9; border-color: #ede9fe; }
.badge-cyan { background: #ecfeff; color: #0e7490; border-color: #cffafe; }
.badge-rose { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.badge-green { background: #ecfdf5; color: #047857; border-color: #d1fae5; }
.badge-zinc { background: #f4f4f5; color: #52525b; border-color: #e4e4e7; }
.badge-p0 { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.badge-p1 { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.badge-p2 { background: #eff6ff; color: #1d4ed8; border-color: #dbeafe; }
.badge-p3 { background: #f8fafc; color: #475467; border-color: #e2e8f0; }

/* ----------------------------------------------------------------- 表格 */

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding: 10px 14px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.tbl td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr { cursor: pointer; transition: background 0.12s; }
table.tbl tbody tr:hover { background: #fafbfd; }
.code-chip {
  font-family: var(--mono);
  font-size: 12px;
  background: #f4f5f8;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--ink-2);
  white-space: nowrap;
}
.cell-title { font-weight: 600; color: var(--ink); }
.cell-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.mono { font-family: var(--mono); font-size: 12.5px; }

/* --------------------------------------------------------------- 进度条 */

.progress {
  height: 6px;
  background: #eceef3;
  border-radius: 20px;
  overflow: hidden;
  min-width: 70px;
}
.progress > i {
  display: block;
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, #6366f1, #4f46e5);
  transition: width 0.3s ease;
}
.progress.done > i { background: linear-gradient(90deg, #34d399, #059669); }
.progress-row { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.progress-row span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; width: 32px; text-align: right; }

/* --------------------------------------------------------------- 工具条 */

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.seg {
  display: inline-flex;
  background: #eceef3;
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  flex-wrap: wrap;
}
.seg button {
  border: 0; background: transparent; padding: 5px 11px; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.seg button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.seg button:hover:not(.active) { color: var(--ink-2); }
.search {
  position: relative; min-width: 200px;
}
.search input { padding-left: 30px; }
.search svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--muted-2); }

.empty {
  padding: 44px 18px;
  text-align: center;
  color: var(--muted);
}
.empty b { display: block; color: var(--ink-2); margin-bottom: 4px; font-size: 14px; }
.empty .btn { margin-top: 12px; }

/* ----------------------------------------------------------------- 抽屉 */

.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(16, 24, 40, 0.36);
  backdrop-filter: blur(2px);
  animation: fade 0.16s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61;
  width: min(780px, 100%);
  background: var(--panel);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  animation: slide 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes slide { from { transform: translateX(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }

.sheet-head {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 12px;
}
.sheet-head h2 { font-size: 16px; margin: 0 0 3px; letter-spacing: -0.2px; }
.sheet-head .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.sheet-body { flex: 1; overflow-y: auto; padding: 20px 22px 40px; }
.sheet-foot {
  border-top: 1px solid var(--border);
  padding: 12px 22px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--panel-2);
}
.sheet-foot .spacer { flex: 1; }

.section-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--muted-2); margin: 22px 0 10px;
}
.section-title:first-child { margin-top: 0; }

.prose { font-size: 14px; line-height: 1.72; color: var(--ink-2); overflow-wrap: anywhere; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--ink); line-height: 1.35; margin: 1.1em 0 0.5em; }
.prose h1 { font-size: 19px; }
.prose h2 { font-size: 16.5px; }
.prose h3 { font-size: 15px; }
.prose p { margin: 0.55em 0; }
.prose ul, .prose ol { margin: 0.5em 0; padding-left: 1.4em; }
.prose li { margin: 0.2em 0; }
.prose code {
  font-family: var(--mono); font-size: 12.5px;
  background: #f4f5f8; border: 1px solid var(--border);
  padding: 1px 5px; border-radius: 5px; color: #b42318;
}
.prose pre {
  background: #101828; color: #e6e8f0;
  padding: 13px 15px; border-radius: 10px; overflow-x: auto;
  font-size: 12.5px; line-height: 1.6;
}
.prose pre code { background: transparent; border: 0; color: inherit; padding: 0; font-size: 12.5px; }
.prose blockquote {
  margin: 0.7em 0; padding: 6px 14px;
  border-left: 3px solid #c7d2fe; background: #f8faff; color: var(--ink-2);
  border-radius: 0 8px 8px 0;
}
.prose a { text-decoration: underline; }
.prose table { border-collapse: collapse; width: 100%; margin: 0.6em 0; font-size: 13px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.prose th { background: var(--panel-2); }

.kv { display: grid; grid-template-columns: 88px 1fr; gap: 8px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink-2); }

.analysis-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-2);
}
.analysis-row { padding: 12px 15px; border-bottom: 1px solid var(--border); }
.analysis-row:last-child { border-bottom: 0; }
.analysis-row .lbl {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 5px;
}
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  padding: 3px 9px; font-size: 12.5px; color: var(--ink-2);
}
.chip.mono { font-family: var(--mono); font-size: 12px; }
.chip.warn { background: var(--warn-soft); border-color: #fde68a; color: #92400e; }
.chip.bad { background: var(--danger-soft); border-color: #fecdd3; color: #a1123a; }

.thread { display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 10px; }
.msg .avatar { width: 28px; height: 28px; font-size: 11px; }
.msg.ai .avatar { background: linear-gradient(135deg, #22d3ee, #0891b2); }
.msg.admin .avatar { background: linear-gradient(135deg, #818cf8, #4f46e5); }
.msg-body { min-width: 0; flex: 1; }
.msg-head { display: flex; align-items: baseline; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.msg-head b { color: var(--ink-2); font-size: 12.5px; }
.msg-bubble {
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 4px 12px 12px 12px; padding: 9px 13px;
  font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere;
}
.msg.ai .msg-bubble { background: #f4fbfd; border-color: #d5f0f7; }
.msg.admin .msg-bubble { background: #f8f9ff; border-color: #e3e6fb; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: flex; gap: 10px; padding: 7px 0;
  font-size: 12.5px; color: var(--ink-2);
  border-bottom: 1px dashed var(--border);
}
.timeline li:last-child { border-bottom: 0; }
.timeline time { color: var(--muted-2); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 11.5px; }
.timeline .who { font-weight: 600; }

/* --------------------------------------------------------------- 提示条 */

.toast-root {
  position: fixed; z-index: 90; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: #101828; color: #fff;
  padding: 9px 16px; border-radius: 10px;
  font-size: 13px; box-shadow: var(--shadow-md);
  animation: toast-in 0.18s ease;
  max-width: 90vw;
}
.toast.err { background: #b42318; }
.toast.ok { background: #067647; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------- 代码块 */

pre.snippet {
  background: #101828; color: #e4e7f0;
  padding: 14px 16px; border-radius: 10px;
  overflow-x: auto; font-family: var(--mono); font-size: 12.5px;
  line-height: 1.65; margin: 0;
  position: relative;
}
.snippet-wrap { position: relative; }
.snippet-wrap .btn-copy {
  position: absolute; top: 8px; right: 8px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.16);
  color: #dfe3ee; font-size: 11.5px; padding: 3px 9px; border-radius: 7px; cursor: pointer;
}
.snippet-wrap .btn-copy:hover { background: rgba(255, 255, 255, 0.18); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps > li {
  counter-increment: step; position: relative;
  padding: 0 0 18px 34px; border-left: 2px solid var(--border); margin-left: 12px;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: -13px; top: -2px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--panel); border: 2px solid var(--primary);
  color: var(--primary-dark); font-size: 12px; font-weight: 700;
  display: grid; place-items: center;
}
.steps h3 { margin: 0 0 5px; font-size: 14px; }
.steps p { margin: 0 0 8px; color: var(--muted); font-size: 13px; }

.tip {
  display: flex; gap: 9px; padding: 11px 14px;
  background: var(--primary-soft); border: 1px solid #e0e7ff;
  border-radius: 10px; font-size: 13px; color: #3730a3;
}
.tip.warn { background: var(--warn-soft); border-color: #fde68a; color: #92400e; }

.divider { height: 1px; background: var(--border); margin: 18px 0; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 120px; }

/* --------------------------------------------------------------- 响应式 */

.burger { display: none; }

@media (max-width: 640px) {
  /* 抽屉底部：纵向堆叠，按钮占满宽度 */
  .sheet-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .sheet-foot > div,
  .sheet-foot > .btn { width: 100%; min-width: 0; }
  .foot-tip,
  .foot-note { flex: none; }
  .sheet-body { padding: 16px 14px 32px; }
  .sheet-head { padding: 14px 14px; }
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 70;
    transform: translateX(-100%); transition: transform 0.2s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: none; }
  .burger { display: grid; }
  .topbar { padding: 12px 16px; }
  .view { padding: 16px 16px 50px; }
  .sheet { width: 100%; }
  .kv { grid-template-columns: 78px 1fr; }
}

/* ---------------------------------------------------------------- 弹窗 */

.modal-card {
  position: fixed;
  z-index: 81;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 22px 24px 20px;
  animation: modal-in 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes modal-in {
  from { opacity: 0; transform: translate(-50%, -48%) scale(0.98); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.modal-card h2 { margin: 0 0 4px; font-size: 16.5px; letter-spacing: -0.2px; }
.modal-card .modal-sub { color: var(--muted); font-size: 12.5px; margin-bottom: 16px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
.modal-card .field:last-of-type { margin-bottom: 4px; }

/* 单行省略（配合 title 使用，保证可读全文） */
.ellipsis {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  max-width: 420px;
}

/* 抽屉底部：提示 / 备注输入框 */
.foot-tip {
  flex: 1;
  min-width: 180px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}
.foot-note { flex: 1; min-width: 220px; }

/* 密钥展示行：只读输入框 + 复制按钮 */
.copy-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.copy-row .token-input {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 13px;
  background: #f8f9fb;
  user-select: all;
  -webkit-user-select: all;
  cursor: text;
}
.copy-row .btn { flex: none; }
