/* 模板预览弹窗（components/template-preview.js） */
.tpv { max-height: calc(100vh - 48px); overflow-y: auto; }
.tpv .tpv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tpv .tpv-head h2 { margin: 0; overflow-wrap: anywhere; }
.tpv .tpv-head .btn { flex: none; margin: -6px -8px 0 0; }
.tpv #tpv-ver { flex-wrap: wrap; margin-bottom: 12px; }
.tpv .tpv-stats { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 16px; font-variant-numeric: tabular-nums; }
.tpv .tpv-stats div { display: grid; }
.tpv .tpv-stats span { font-size: 12px; color: var(--muted-foreground); }
.tpv .tpv-stats b { font-size: 16px; font-weight: 600; }
.tpv .tpv-subject { padding: 10px 12px; border: 1px solid var(--border); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; background: var(--soft); font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
/* 邮件正文按收件人看到的白底显示（iframe 里是邮件自己的文档） */
.tpv .tpv-frame { display: block; width: 100%; height: 360px; border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); background: #fff; }
.tpv .tpv-loading .skeleton { height: 320px; }
.tpv .tpv-error { display: grid; justify-items: center; gap: 10px; padding: 40px 16px; text-align: center; color: var(--destructive); }
.tpv .tpv-error p { margin: 0; }
.tpv mark.tpv-var { background: var(--warning-soft); color: inherit; border-radius: 3px; padding: 0 2px; }
/* 表格里可点的模板名 */
.tpl-link { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tpl-link:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.tpl-link:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; border-radius: 3px; }
