/* ═══════════════════════════════════════════════════════════
   统一发布管理平台 · 组件层 v5.0
   主题：石墨暗黑（与 site.css 联动）
   覆写 Bootstrap 5：标题、卡片、表格、表单、按钮、徽章、
   弹窗、进度条、提示条、手风琴、上传区、空状态
   依赖 site.css 中定义的变量
   ═══════════════════════════════════════════════════════════ */

/* ═══════════ 页面标题区 ═══════════ */
.page-head {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  padding-bottom: 16px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}
/* 标题区底部品牌短线 */
.page-head::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 150px;
  height: 1px;
  background: var(--brand);
  opacity: 0.45;
}

.page-head-main { min-width: 0; }

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3.5px 12px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brand-lit);
  background: var(--line-hair);
  border: 1px solid var(--line-soft);
  border-radius: 99px;
  margin-bottom: 8px;
}
.page-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.page-title {
  font-family: var(--ff-display);
  font-size: clamp(23px, 2.2vw, 30px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: transparent;
  background: var(--grad-title, linear-gradient(180deg, #ffffff 15%, #b7a6f7 100%));
  -webkit-background-clip: text;
  background-clip: text;
  margin: 0;
}

.page-note {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--tx-faint);
}

.page-head-side {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding-bottom: 2px;
}

/* ═══════════ 卡片 ═══════════ */
.card {
  position: relative;
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--card-bg-top, #141418), var(--card-bg-bottom, #0f0f12));
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  overflow: hidden;
  transition: box-shadow var(--t-base) var(--ez), border-color var(--t-base) var(--ez), background-color 0.3s ease;
}
/* 顶部发丝高光 */
.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 2%, var(--line-firm) 32%, var(--line-soft) 55%, transparent 96%);
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
}
.card:hover {
  border-color: var(--line-firm);
  box-shadow: var(--sh-3);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--card-header-bg, rgba(255, 255, 255, 0.02));
  border-bottom: 1px solid var(--line-hair);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tx-mute);
}
.card-header::before {
  content: '';
  flex: 0 0 auto;
  width: 2px;
  height: 13px;
  background: var(--brand);
  border-radius: 2px;
}

.card-body { padding: 18px; }
.card-footer {
  padding: 12px 18px;
  background: var(--card-footer-bg, rgba(255, 255, 255, 0.015));
  border-top: 1px solid var(--line-hair);
}

.card-title {
  font-family: var(--ff-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--tx-strong);
  letter-spacing: -0.005em;
}
.card-text { color: var(--tx-body); }

/* 卡片内嵌套的透明子卡片（弹窗内使用） */
.card .card.is-plain,
.card.is-plain {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}
.card.is-plain::before, .card.is-plain::after { display: none; }
.card.is-plain > .card-header {
  padding: 0 0 8px;
  background: transparent;
  border-bottom: 1px solid var(--line-hair);
  margin-bottom: 12px;
}
.card.is-plain > .card-body { padding: 0; }

/* 强调框：弹窗内"检测到的配置" */
.panel-accent {
  background: var(--brand-film);
  border: 1px solid var(--brand-edge);
  border-radius: var(--r-md);
  box-shadow: inset 0 1px 0 var(--glass-hi);
}
.panel-accent > .card-header {
  background: var(--brand-film);
  color: var(--brand-lit);
  border-bottom-color: var(--brand-edge);
}

/* ═══════════ 指标卡 ═══════════ */
.metric {
  position: relative;
  height: 100%;
  padding: 18px 18px 16px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(155deg, var(--metric-bg-top, #16161b), var(--metric-bg-bottom, #101013));
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2), inset 0 1px 0 var(--glass-hi);
  overflow: hidden;
  transition: transform var(--t-base) var(--ez), box-shadow var(--t-base) var(--ez), border-color var(--t-base) var(--ez);
}
.metric:hover {
  transform: translateY(-2px);
  border-color: var(--line-firm);
  box-shadow: var(--sh-3);
}

/* 顶部语义色条 */
.metric::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--brand);
}
.metric.tone-ok::before { background: var(--ok); }
.metric.tone-warn::before { background: var(--warn); }
.metric.tone-info::before { background: var(--info); }
.metric.tone-err::before { background: var(--err); }
.metric.tone-ok:hover { box-shadow: var(--sh-3), var(--glow-ok); }
.metric.tone-warn:hover { box-shadow: var(--sh-3), var(--glow-warn); }
.metric.tone-err:hover { box-shadow: var(--sh-3), var(--glow-err); }
.metric.tone-info:hover { box-shadow: var(--sh-3), var(--glow-info); }

/* 右下角大号水印符号 */
.metric-glyph {
  position: absolute;
  right: 10px;
  bottom: -4px;
  font-size: 58px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  opacity: 0.5;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ez);
}
.metric:hover .metric-glyph {
  opacity: 0.75;
}

.metric-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tx-faint);
  margin-bottom: 10px;
}

.metric-value {
  font-family: var(--ff-display);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  background: var(--grad-title, linear-gradient(180deg, #fafaff 20%, #b8b2cc 100%));
  -webkit-background-clip: text;
  background-clip: text;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.metric-unit {
  font-family: var(--ff-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--tx-faint);
  margin-left: 4px;
}

.metric-foot {
  margin-top: 9px;
  font-size: 11px;
  color: var(--tx-mute);
}

/* ═══════════ 表格 ═══════════ */
.table-frame {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  margin: 0;
  color: var(--tx-body);
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
}

.table > thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 14px;
  background: var(--thead-bg, rgba(16, 16, 19, 0.95));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tx-mute);
  white-space: nowrap;
}
/* 表头 HUD 刻度 */
.table > thead > tr > th::before {
  content: '';
  display: inline-block;
  width: 2px;
  height: 9px;
  margin-right: 8px;
  vertical-align: 0;
  background: var(--brand);
  border-radius: 1px;
}

.table > tbody > tr > td {
  padding: 11px 14px;
  background: transparent;
  border-bottom: 1px solid var(--line-hair);
  vertical-align: middle;
  color: var(--tx-body);
}

.table > tbody > tr { transition: background var(--t-fast) var(--ez), box-shadow var(--t-fast) var(--ez); }
/* 行悬停：极淡品牌底 + 首列指示条 */
.table > tbody > tr:hover > td {
  background: rgba(124, 108, 255, 0.06);
}
.table > tbody > tr:hover > td:first-child {
  box-shadow: inset 2.5px 0 0 var(--brand-lit);
}
.table > tbody > tr:last-child > td { border-bottom: 0; }

.table strong { color: var(--tx-strong); font-weight: 600; }
.table .cell-num { font-family: var(--ff-mono); font-variant-numeric: tabular-nums; font-size: 12px; }
.table .cell-actions { white-space: nowrap; }

/* 更新日志表格布局 */
.table-wrap { position: relative; }
.table-log { min-width: 900px; width: max-content; }
.table-log .col-device { width: 300px; min-width: 260px; }
.table-log .col-project { width: 70px; min-width: 60px; }
.table-log .col-from { width: 100px; min-width: 90px; }
.table-log .col-to { width: 100px; min-width: 90px; }
.table-log .col-type { width: 90px; min-width: 80px; }
.table-log .col-status { width: 80px; min-width: 70px; }
.table-log .col-start { width: 140px; min-width: 130px; }
.table-log .col-end { width: 140px; min-width: 130px; }
.table-log td, .table-log th { white-space: nowrap; }

/* 分页工具栏 */
.log-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.log-page-size {
  display: flex;
  align-items: center;
  gap: 8px;
}
.log-toolbar-label {
  font-size: 11.5px;
  color: var(--tx-faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.log-pagination { display: flex; align-items: center; gap: 6px; }
.log-toolbar-hint {
  font-size: 11.5px;
  color: var(--tx-faint);
}
.log-page-list { display: flex; align-items: center; gap: 6px; }
.log-page-btn { min-width: 30px; padding: 0 8px; height: 28px; }
.log-page-btn.is-active {
  --btn-fg: var(--brand-ink);
  --btn-bd: transparent;
  background: var(--grad-btn);
  font-weight: 600;
  color: var(--brand-ink);
  border-color: transparent;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.log-page-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 12px;
  color: var(--tx-faint);
  user-select: none;
}

/* 文档型表格（使用指南） */
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > td {
  border: 1px solid var(--line-hair);
}
.table-bordered > thead > tr > th { position: static; }
.table > thead.table-light > tr > th {
  background: var(--panel-deep, var(--bg-600));
  color: var(--tx-body);
}

/* ═══════════ 徽章 ═══════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  font-family: var(--ff-body);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  line-height: 1.5;
  border-radius: var(--r-xs);
  border: 1px solid transparent;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 var(--glass-hi);
}

.badge-ok, .badge.bg-success {
  color: var(--ok) !important;
  background: var(--ok-film) !important;
  border-color: var(--ok-edge);
}
.badge-warn, .badge.bg-warning {
  color: var(--warn) !important;
  background: var(--warn-film) !important;
  border-color: var(--warn-edge);
}
.badge-bad, .badge.bg-danger {
  color: var(--err) !important;
  background: var(--err-film) !important;
  border-color: var(--err-edge);
}
.badge-info, .badge.bg-info {
  color: var(--info) !important;
  background: var(--info-film) !important;
  border-color: var(--info-edge);
}
.badge-brand, .badge.bg-primary {
  color: var(--brand-lit) !important;
  background: var(--brand-film) !important;
  border-color: var(--brand-edge);
}
.badge-idle, .badge.bg-secondary {
  color: var(--tx-mute) !important;
  background: var(--line-hair) !important;
  border-color: var(--line-soft);
}

/* 平台标签 */
.badge-plat {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--tx-body) !important;
  background: var(--line-hair) !important;
  border-color: var(--line-soft);
  text-transform: lowercase;
}

/* 版本号胶囊 */
.badge-version {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  font-family: var(--ff-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand-lit);
  background: var(--brand-film);
  border: 1px solid var(--brand-edge);
  border-radius: 99px;
  white-space: nowrap;
}

/* ═══════════ 按钮 ═══════════ */
.btn {
  --btn-fg: var(--tx-body);
  --btn-bg: transparent;
  --btn-bd: var(--line-firm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 15px;
  font-family: var(--ff-body);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--t-fast) var(--ez);
}
.btn:hover { color: var(--btn-fg); filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg-900), 0 0 0 3.5px var(--brand-edge);
}
:root[data-theme="light"] .btn:focus-visible {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 3.5px var(--brand-edge);
}
.btn:disabled, .btn.disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  filter: none;
  box-shadow: none;
}

.btn-sm { padding: 4px 10px; font-size: 11.5px; border-radius: var(--r-xs); }
.btn-lg { padding: 10px 22px; font-size: 14px; border-radius: var(--r-md); }

/* 主操作：蓝紫实心 */
.btn-primary {
  --btn-fg: var(--brand-ink);
  --btn-bd: transparent;
  background: var(--grad-btn);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 16px -10px rgba(0, 0, 0, 0.9);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { box-shadow: none; }

/* 次操作：描边 */
.btn-secondary,
.btn-outline-secondary {
  --btn-fg: var(--tx-body);
  --btn-bg: var(--line-hair);
  --btn-bd: var(--line-firm);
}
.btn-secondary:hover, .btn-outline-secondary:hover {
  --btn-fg: var(--tx-strong);
  border-color: var(--line-strong);
}
.btn-outline-primary {
  --btn-fg: var(--brand-lit);
  --btn-bg: var(--brand-film);
  --btn-bd: var(--brand-edge);
}
.btn-outline-primary:hover { --btn-fg: var(--brand-lit); box-shadow: var(--glow-brand); }
.btn-outline-success {
  --btn-fg: var(--ok);
  --btn-bg: var(--ok-film);
  --btn-bd: var(--ok-edge);
}
.btn-outline-success:hover { --btn-fg: var(--ok); box-shadow: var(--glow-ok); }
.btn-outline-warning {
  --btn-fg: var(--warn);
  --btn-bg: var(--warn-film);
  --btn-bd: var(--warn-edge);
}
.btn-outline-warning:hover { --btn-fg: var(--warn); box-shadow: var(--glow-warn); }
.btn-outline-danger {
  --btn-fg: var(--err);
  --btn-bg: var(--err-film);
  --btn-bd: var(--err-edge);
}
.btn-outline-danger:hover { --btn-fg: var(--err); box-shadow: var(--glow-err); }
.btn-outline-info {
  --btn-fg: var(--info);
  --btn-bg: var(--info-film);
  --btn-bd: var(--info-edge);
}
.btn-outline-info:hover { --btn-fg: var(--info); box-shadow: var(--glow-info); }
.btn-outline-dark {
  --btn-fg: var(--tx-mute);
  --btn-bg: transparent;
  --btn-bd: var(--line-soft);
}
.btn-outline-dark:hover { --btn-fg: var(--tx-body); border-color: var(--line-firm); box-shadow: none; }

/* 图标方按钮 */
.btn-icon {
  width: 30px;
  padding: 0;
  height: 30px;
  flex: 0 0 auto;
}
.btn-sm.btn-icon { width: 26px; height: 26px; }

/* 关闭按钮 */
.btn-close {
  width: 26px;
  height: 26px;
  padding: 0;
  margin: 0;
  display: grid;
  place-items: center;
  background: none;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xs);
  opacity: 1;
  cursor: pointer;
  transition: all var(--t-fast) var(--ez);
}
.btn-close::before {
  content: '\00d7';
  font-size: 17px;
  line-height: 1;
  color: var(--tx-mute);
}
.btn-close:hover {
  border-color: var(--err-edge);
  background: var(--err-film);
  transform: rotate(90deg);
}
.btn-close:hover::before { color: var(--err); }

/* ═══════════ 表单 ═══════════ */
.form-label {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tx-mute);
}
.form-label .text-danger { color: var(--err) !important; }

.form-control,
.form-select {
  width: 100%;
  padding: 7px 11px;
  font-family: var(--ff-body);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--tx-strong);
  background-color: var(--field-bg, rgba(16, 16, 19, 0.9));
  background-image: none;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: border-color var(--t-fast) var(--ez), box-shadow var(--t-fast) var(--ez), background-color var(--t-fast) var(--ez);
  appearance: none;
}
:root[data-theme="light"] .form-control,
:root[data-theme="light"] .form-select {
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.form-control::placeholder { color: var(--tx-faint); }

.form-control:focus,
.form-select:focus {
  color: var(--tx-strong);
  background-color: var(--field-bg-focus, rgba(21, 21, 25, 0.95));
  border-color: var(--brand-edge);
  box-shadow: 0 0 0 3px var(--brand-film), inset 0 1px 2px rgba(0, 0, 0, 0.25);
  outline: none;
}

.form-control[readonly] {
  color: var(--tx-mute);
  background-color: var(--panel-deep, rgba(16, 16, 19, 0.7));
  cursor: default;
  box-shadow: none;
}

.form-control-sm, .form-select-sm {
  padding: 5px 9px;
  font-size: 12px;
}

textarea.form-control {
  font-family: var(--ff-mono);
  font-size: 12px;
  line-height: 1.65;
  resize: vertical;
  min-height: 76px;
}

.form-select {
  padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--tx-mute) 50%),
                    linear-gradient(135deg, var(--tx-mute) 50%, transparent 50%);
  background-position: calc(100% - 15px) center, calc(100% - 10px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.form-text, .form-hint, small.text-muted {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--tx-faint) !important;
}

/* 输入组 */
.input-group { display: flex; align-items: stretch; }
.input-group > .form-control,
.input-group > .form-select { min-width: 0; flex: 1 1 auto; }
.input-group > :not(:first-child) {
  margin-left: -1px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.input-group > :not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.input-group > .btn { position: relative; z-index: 2; }
.input-group-text {
  display: flex;
  align-items: center;
  padding: 7px 11px;
  font-size: 12.5px;
  color: var(--tx-mute);
  background: var(--panel-deep, var(--bg-700));
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
}

/* 勾选 / 开关 */
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: auto;
  margin: 0;
  padding: 0;
}
.form-check-input {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 0;
  background-color: var(--field-bg, var(--bg-900));
  border: 1px solid var(--line-firm);
  border-radius: var(--r-xs);
  cursor: pointer;
  transition: all var(--t-fast) var(--ez);
  appearance: none;
}
.form-check-input:checked {
  background-color: var(--brand);
  border-color: var(--brand);
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m3.5 8.5 3 3 6-6'/%3e%3c/svg%3e");
  background-size: 11px;
  background-position: center;
  background-repeat: no-repeat;
}
.form-check-input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-film);
}
.form-check-label {
  font-size: 12.5px;
  color: var(--tx-body);
  cursor: pointer;
  margin: 0;
}

.form-switch { gap: 9px; }
.form-switch .form-check-input {
  width: 32px;
  height: 17px;
  border-radius: 99px;
  background-image: radial-gradient(circle 5.5px at 9px center, var(--tx-mute) 100%, transparent 0);
  background-repeat: no-repeat;
  transition: background var(--t-base) var(--ez), border-color var(--t-base) var(--ez);
}
.form-switch .form-check-input:checked {
  background-color: var(--brand-film);
  border-color: var(--brand-edge);
  background-image: radial-gradient(circle 5.5px at 22px center, var(--brand-lit) 100%, transparent 0);
  background-size: auto;
}

/* Yii 校验反馈 */
.has-error .form-control, .form-control.is-invalid {
  border-color: var(--err-edge);
  box-shadow: 0 0 0 3px var(--err-film);
}
.help-block, .invalid-feedback {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--err);
}

/* ═══════════ 提示条 ═══════════ */
.alert {
  position: relative;
  padding: 11px 14px 11px 15px;
  font-size: 12.5px;
  color: var(--tx-body);
  background: var(--line-hair);
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--tx-faint);
  border-radius: var(--r-sm);
  box-shadow: inset 0 1px 0 var(--glass-hi);
}
.alert strong { color: var(--tx-strong); }
.alert-link { text-decoration: underline; }

.alert-info { border-left-color: var(--info); background: var(--info-film); border-color: var(--info-edge); border-left-width: 2px; }
.alert-info strong { color: var(--info); }
.alert-success { border-left-color: var(--ok); background: var(--ok-film); border-color: var(--ok-edge); border-left-width: 2px; }
.alert-success strong { color: var(--ok); }
.alert-warning { border-left-color: var(--warn); background: var(--warn-film); border-color: var(--warn-edge); border-left-width: 2px; }
.alert-warning strong { color: var(--warn); }
.alert-danger { border-left-color: var(--err); background: var(--err-film); border-color: var(--err-edge); border-left-width: 2px; }
.alert-danger strong { color: var(--err); }

/* ═══════════ 弹窗 ═══════════ */
.modal { z-index: 1090; }
.modal-backdrop {
  background-color: #000000;
}
.modal-backdrop.show { opacity: 0.72; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

.modal-dialog {
  margin: 1.5rem auto;
  max-height: calc(100vh - 3rem);
  display: flex;
}
.modal-dialog-centered { align-items: center; min-height: calc(100% - 3rem); }

.modal-content {
  position: relative;
  width: 100%;
  max-height: calc(100vh - 3rem);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--modal-grad, linear-gradient(180deg, #151519 0%, #101013 100%));
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
}

.modal-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--card-header-bg, rgba(255, 255, 255, 0.02));
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}

.modal-title {
  font-family: var(--ff-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--tx-strong);
  margin: 0;
}
.modal-header .btn-close { margin-left: auto; }

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px;
  overflow-y: auto;
}

.modal-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 20px;
  background: var(--card-footer-bg, rgba(255, 255, 255, 0.015));
  border-top: 1px solid var(--line-soft);
}
.modal-footer > * { margin: 0; }

.modal.fade .modal-dialog {
  transform: translateY(14px) scale(0.985);
  transition: transform var(--t-base) var(--ez), opacity var(--t-base) var(--ez);
}
.modal.show .modal-dialog { transform: none; }

/* 弹窗内小节标题 */
.modal-section {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 7px;
  margin-bottom: 13px;
  border-bottom: 1px solid var(--line-hair);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-lit);
}
.modal-section::before {
  content: '';
  width: 2.5px;
  height: 11px;
  background: var(--grad-brand);
  border-radius: 2px;
}
.modal-section + .modal-section { margin-top: 20px; }

/* 弹窗步骤指示 */
.step-track {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.step-node {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--tx-faint);
}
.step-node b {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  font-family: var(--ff-mono);
  font-size: 10px;
  font-weight: 500;
  border: 1px solid var(--line-firm);
  border-radius: 50%;
}
.step-node.is-on { color: var(--brand-lit); }
.step-node.is-on b {
  border-color: var(--brand);
  background: var(--brand-film);
}
.step-rule {
  flex: 1 1 auto;
  height: 1px;
  background: var(--line-soft);
}

/* 键值对展示（版本详情） */
.kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  background: var(--line-hair);
  border: 1px solid var(--line-hair);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.kv-cell {
  padding: 10px 13px;
  background: var(--panel-deep, var(--bg-800));
  transition: background var(--t-fast) var(--ez);
}
.kv-cell:hover { background: var(--bg-600); }
:root[data-theme="light"] .kv-cell:hover { background: #edeaf8; }
.kv-key {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tx-faint);
  margin-bottom: 3px;
}
.kv-val {
  font-size: 12.5px;
  color: var(--tx-strong);
  word-break: break-all;
}
.kv-val.is-mono { font-family: var(--ff-mono); font-size: 11.5px; }

/* ═══════════ 进度条 ═══════════ */
.progress {
  height: 6px;
  background: var(--panel-deep, var(--bg-900));
  border: 1px solid var(--line-hair);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 9px;
  font-weight: 600;
  color: var(--brand-ink);
  background: var(--grad-brand);
  transition: width var(--t-base) var(--ez);
}
.progress-bar-striped {
  background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.16) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.16) 50%, rgba(0, 0, 0, 0.16) 75%, transparent 75%, transparent), var(--grad-brand);
  background-size: 10px 10px, auto;
}
.progress-bar-animated { animation: barFlow 0.9s linear infinite; }
@keyframes barFlow { from { background-position: 10px 0, 0 0; } to { background-position: 0 0, 0 0; } }

/* ═══════════ 上传区（版本发布） ═══════════ */
.dropzone {
  position: relative;
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  background: var(--panel-deep, #101013);
  border: 1px dashed var(--line-firm);
  border-radius: var(--r-md);
  transition: all var(--t-fast) var(--ez);
}
.dropzone:hover, .dropzone.is-over {
  border-color: var(--brand-edge);
  background: var(--brand-film);
}
.dropzone-glyph {
  font-size: 20px;
  line-height: 1;
  margin-bottom: 6px;
  opacity: 0.75;
}
.dropzone-text { font-size: 12.5px; color: var(--tx-body); }
.dropzone-link {
  color: var(--brand-lit);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}
.dropzone-hint {
  margin-top: 3px;
  font-size: 11px;
  color: var(--tx-faint);
}

.filelist {
  max-height: 140px;
  overflow-y: auto;
  background: var(--panel-deep, var(--bg-900));
  border: 1px solid var(--line-hair);
  border-radius: var(--r-sm);
}
.filelist-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 11px;
  font-size: 11.5px;
  border-bottom: 1px solid var(--line-hair);
}
.filelist-row:hover { background: var(--line-hair); }
.filelist-row:last-child { border-bottom: 0; }
.filelist-name {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--ff-mono);
  color: var(--tx-body);
  word-break: break-all;
}
.filelist-size {
  flex: 0 0 auto;
  font-family: var(--ff-mono);
  color: var(--tx-faint);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ═══════════ 空状态 / 占位 ═══════════ */
.blank {
  padding: 44px 20px;
  text-align: center;
}
.blank-glyph {
  font-size: 28px;
  opacity: 0.3;
  margin-bottom: 10px;
  animation: glyphPulse 3.2s ease-in-out infinite;
}
@keyframes glyphPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}
.blank-title {
  font-family: var(--ff-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--tx-mute);
  margin-bottom: 4px;
}
.blank-note { font-size: 12px; color: var(--tx-faint); }

/* 表格内占位单元格 */
.table .blank { padding: 34px 16px; }

/* ═══════════ 手风琴（使用指南 FAQ） ═══════════ */
.accordion {
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--card-bg-bottom, rgba(8, 13, 24, 0.6));
}
.accordion-item {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-hair);
}
.accordion-item:last-child { border-bottom: 0; }
.accordion-header { margin: 0; }
.accordion-button {
  width: 100%;
  padding: 13px 16px;
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  color: var(--tx-strong);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  transition: background var(--t-fast) var(--ez), color var(--t-fast) var(--ez);
}
.accordion-button:hover { background: var(--line-hair); }
.accordion-button::after {
  width: 9px;
  height: 9px;
  margin-left: auto;
  background: none;
  border-right: 1.5px solid var(--brand-lit);
  border-bottom: 1.5px solid var(--brand-lit);
  transform: rotate(45deg);
  transition: transform var(--t-base) var(--ez);
}
.accordion-button:not(.collapsed) {
  color: var(--brand-lit);
  background: var(--brand-film);
  box-shadow: none;
}
.accordion-button:not(.collapsed)::after { transform: rotate(-135deg); }
.accordion-button:focus { box-shadow: none; border: 0; }
.accordion-body {
  padding: 13px 16px 16px;
  font-size: 12.5px;
  color: var(--tx-body);
  background: transparent;
}

/* ═══════════ 文档页排版（使用指南） ═══════════ */
.doc-layout {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.doc-toc {
  position: sticky;
  top: 0;
  padding: 2px 0;
}
.doc-toc-title {
  padding: 0 10px 9px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tx-faint);
}
.doc-toc-link {
  display: block;
  padding: 6px 10px;
  border-left: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--tx-mute);
  transition: all var(--t-fast) var(--ez);
}
.doc-toc-link:hover {
  color: var(--tx-strong);
  border-left-color: var(--line-firm);
  background: var(--line-hair);
}
.doc-toc-link.is-active {
  color: var(--brand-lit);
  border-left-color: var(--brand);
  background: linear-gradient(90deg, var(--brand-film), transparent 85%);
}

.doc-body { min-width: 0; }
.doc-section { margin-bottom: 42px; scroll-margin-top: 18px; }
.doc-section:last-child { margin-bottom: 8px; }

.doc-h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--ff-display);
  font-size: 21px;
  font-weight: 700;
  color: transparent;
  background: var(--grad-title, linear-gradient(180deg, #fafaff 20%, #b8b2cc 100%));
  -webkit-background-clip: text;
  background-clip: text;
  padding-bottom: 10px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--line-soft);
}
.doc-h2 span {
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--brand-lit);
  -webkit-text-fill-color: var(--brand-lit);
}
.doc-h3 {
  font-family: var(--ff-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--tx-strong);
  margin: 24px 0 10px;
  letter-spacing: -0.005em;
}
.doc-body p { margin: 0 0 12px; }
.doc-body ul, .doc-body ol { margin: 0 0 14px; padding-left: 20px; }
.doc-body li { margin-bottom: 5px; }
.doc-body li::marker { color: var(--brand-lit); }

/* ═══════════ 通用工具类覆写 ═══════════ */
.text-muted { color: var(--tx-faint) !important; }
.text-secondary { color: var(--tx-mute) !important; }
.text-danger { color: var(--err) !important; }
.text-success { color: var(--ok) !important; }
.text-warning { color: var(--warn) !important; }
.text-primary { color: var(--brand-lit) !important; }
.text-info { color: var(--info) !important; }
.text-body-secondary { color: var(--tx-mute) !important; }

.section-gap { margin-bottom: 20px; }
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.toolbar-end { margin-left: auto; }

@media (max-width: 991.98px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .doc-toc { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .doc-toc-title { width: 100%; padding-left: 0; }
  .doc-toc-link { border-left: 0; border: 1px solid var(--line-soft); border-radius: var(--r-xs); }
  .page-head { flex-wrap: wrap; }
  .page-head-side { margin-left: 0; width: 100%; }
}


/* ═══════════ 发布版本弹窗（v3 · 单列 + 吸底操作栏） ═══════════ */

.publish-dialog {
  max-width: 880px;
  width: 96vw;
}
.publish-dialog .modal-content {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
}

/* 头部 */
.publish-header {
  flex: 0 0 auto;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px 11px;
  background: var(--card-header-bg, rgba(255, 255, 255, 0.02));
  border-bottom: 1px solid var(--line-soft);
}
.publish-head-main { flex: 1 1 auto; min-width: 0; }
.publish-head-sub {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--tx-mute);
}
.publish-header .btn-close { flex: 0 0 auto; margin-top: 2px; }

/* 主体：单列滚动区 */
.publish-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 目标信息（只读，跟随标题行内联） */
.pub-meta {
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--line-soft);
  font-size: 11.5px;
  color: var(--tx-mute);
}
.pub-meta-sep { margin: 0 5px; color: var(--tx-faint); }

/* 版本号 */
.pub-version-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.pub-version-row .form-control {
  flex: 0 1 230px;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.pub-bump { display: inline-flex; gap: 6px; }
.pub-bump .btn {
  padding: 5px 10px;
  font-size: 11.5px;
  white-space: nowrap;
}
.pub-hint {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--tx-faint);
}
.pub-hint.is-ok { color: var(--tx-mute); }
.pub-hint.is-warn { color: var(--warn); }
.pub-hint.is-err { color: var(--err); }

/* 分区标题行 */
.pub-block { display: flex; flex-direction: column; }
.pub-block-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
  margin-bottom: 9px;
}
.pub-block-title {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--tx-strong);
}
.pub-block-note { font-size: 11px; color: var(--tx-faint); }
.pub-block-tools { margin-left: auto; display: inline-flex; gap: 6px; }

/* 上传区：已选文件后收成一条，把空间让给文件列表 */
.pub-dropzone { padding: 18px 14px; }
.pub-dropzone .dropzone-glyph { margin-bottom: 5px; font-size: 18px; }
.pub-dropzone.is-compact { padding: 9px 14px; }
.pub-dropzone.is-compact .dropzone-glyph,
.pub-dropzone.is-compact .dropzone-hint { display: none; }

/* 文件面板 */
.pub-filepanel {
  margin-top: 10px;
  overflow: hidden;
  background: var(--panel-deep, var(--bg-900));
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
}
.pub-filepanel .filelist {
  max-height: 190px;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.pub-progress {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-hair);
}
.pub-progress-text {
  margin-top: 6px;
  font-size: 11px;
  color: var(--tx-mute);
  font-variant-numeric: tabular-nums;
}
.pub-filepanel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  font-size: 11.5px;
  color: var(--tx-mute);
  border-bottom: 1px solid var(--line-hair);
}
.pub-filepanel-head b { color: var(--tx-strong); font-weight: 600; }
.pub-filepanel-head .btn { margin-left: auto; }
.pub-pkg-state { font-size: 11px; }
.pub-pkg-state.is-ok { color: var(--ok); }
.pub-pkg-state.is-bad { color: var(--err); }

/* 文件行状态点 */
.filelist-state {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  background: transparent;
  border: 1px solid var(--line-hair);
  border-radius: 50%;
  transition: all var(--t-fast) var(--ez);
}
.filelist-row.is-uploading .filelist-state {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-film);
}
.filelist-row.is-done .filelist-state {
  border-color: var(--ok);
  background: var(--ok);
}

/* 更新说明 */
.pub-tabs {
  margin-left: auto;
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  background: var(--field-bg, var(--bg-900));
  border: 1px solid var(--line-hair);
  border-radius: var(--r-sm);
}
.pub-tabs button {
  padding: 4px 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--tx-mute);
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--t-fast) var(--ez);
}
.pub-tabs button:hover { color: var(--tx-strong); }
.pub-tabs button.is-on {
  color: var(--brand-lit);
  background: var(--brand-film);
}
.pub-notes-preview {
  min-height: 230px;
  max-height: 340px;
  overflow-y: auto;
  padding: 12px 14px;
  font-size: 12.5px;
  background: var(--panel-deep, var(--bg-900));
  border: 1px solid var(--line-hair);
  border-radius: var(--r-sm);
}

/* 高级设置 */
.pub-advanced {
  background: var(--field-bg, var(--bg-900));
  border: 1px solid var(--line-hair);
  border-radius: var(--r-sm);
}
.pub-advanced > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--tx-mute);
  list-style: none;
  cursor: pointer;
}
.pub-advanced > summary::-webkit-details-marker { display: none; }
.pub-advanced > summary::before {
  content: '';
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform var(--t-fast) var(--ez);
}
.pub-advanced[open] > summary {
  color: var(--tx-strong);
  border-bottom: 1px solid var(--line-hair);
}
.pub-advanced[open] > summary::before { transform: rotate(45deg); }
.pub-advanced-body { padding: 12px 12px 4px; }

/* 吸底操作栏 */
.publish-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: var(--card-footer-bg, rgba(255, 255, 255, 0.015));
  border-top: 1px solid var(--line-soft);
}
.publish-footer-hint {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--tx-faint);
}
.publish-footer-hint.is-ok { color: var(--ok); }
.publish-footer-hint.is-err { color: var(--err); }
.publish-footer-btns { flex: 0 0 auto; display: inline-flex; gap: 8px; }
.publish-footer-btns .btn {
  min-height: 34px;
  padding: 0 16px;
  font-size: 12.5px;
  font-weight: 600;
}

/* 上传中：锁住所有会改变发布内容的入口 */
.publish-modal.is-busy .btn-close,
.publish-modal.is-busy #btn-cancel-publish,
.publish-modal.is-busy #btn-save-draft,
.publish-modal.is-busy #btn-clear-files,
.publish-modal.is-busy #btn-pick-files,
.publish-modal.is-busy #btn-pick-dir,
.publish-modal.is-busy .pub-bump button {
  opacity: 0.4;
  pointer-events: none;
}

/* 轻提示 */
.pub-toast {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 2100;
  max-width: 400px;
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--tx-strong);
  background: var(--bg-700, #151519);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--ok);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-3, 0 14px 40px rgba(0, 0, 0, 0.45));
  animation: pubToastIn 160ms var(--ez) both;
}
.pub-toast.is-err { border-left-color: var(--err); }
@keyframes pubToastIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .publish-body { padding: 14px; }
  .pub-version-row { flex-wrap: wrap; }
  .pub-version-row .form-control { flex: 1 1 100%; }
  .publish-footer { flex-wrap: wrap; }
  .publish-footer-btns { width: 100%; }
  .publish-footer-btns .btn { flex: 1 1 auto; }
}

/* ═══════════ 更新说明编辑器（textarea + 工具栏） ═══════════ */
.notes-editor {
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--panel-deep, var(--bg-900));
}
.notes-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  background: var(--card-header-bg, var(--bg-800));
  border-bottom: 1px solid var(--line-soft);
}
.notes-toolbar-group {
  display: flex;
  align-items: center;
  gap: 2px;
}
.notes-btn {
  flex: 0 0 auto;
  width: 28px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  background: transparent;
  color: var(--tx-mute);
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  font-family: var(--ff-mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background var(--t-fast) var(--ez), color var(--t-fast) var(--ez), border-color var(--t-fast) var(--ez);
}
.notes-btn:hover {
  background: var(--line-hair);
  color: var(--tx-strong);
}
.notes-btn:active {
  background: var(--brand-film);
  color: var(--brand-lit);
}
.notes-hint {
  font-size: 10.5px;
  color: var(--tx-faint);
  white-space: nowrap;
}
.notes-textarea {
  display: block;
  width: 100%;
  min-height: 160px;
  padding: 12px 14px;
  margin: 0;
  background: var(--panel-deep, var(--bg-900));
  color: var(--tx-strong);
  border: 0;
  border-radius: 0;
  outline: 0;
  resize: vertical;
  font-family: var(--ff-mono);
  font-size: 12.5px;
  line-height: 1.65;
}
.notes-textarea::placeholder { color: var(--tx-faint); opacity: 0.7; }
.notes-textarea:focus {
  background: var(--panel-deep, var(--bg-900));
  box-shadow: inset 0 0 0 2px var(--brand-edge);
}

/* 右侧面板：更新说明实时预览 */
.notes-render {
  padding: 12px 14px;
  background: var(--panel-deep, var(--bg-900));
  border: 1px solid var(--line-hair);
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--tx-body);
  min-height: 60px;
  max-height: 260px;
  overflow-y: auto;
}
.notes-render > .text-muted { color: var(--tx-faint); font-style: italic; }
.notes-render h1, .notes-render h2, .notes-render h3 {
  margin: 0 0 8px;
  color: var(--tx-strong);
  font-weight: 700;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 4px;
}
.notes-render h1 { font-size: 15px; }
.notes-render h2 { font-size: 13.5px; }
.notes-render h3 { font-size: 12.5px; border-bottom: 0; }
.notes-render p { margin: 0 0 8px; line-height: 1.6; }
.notes-render ul, .notes-render ol { margin: 0 0 8px; padding-left: 20px; }
.notes-render li { margin-bottom: 3px; }
.notes-render li::marker { color: var(--brand-lit); }
.notes-render code {
  padding: 1px 5px;
  background: var(--code-bg, var(--bg-800));
  color: var(--brand-lit);
  border-radius: 3px;
  font-size: 11px;
}
.notes-render pre {
  padding: 10px 12px;
  background: var(--card-header-bg, var(--bg-800));
  border-radius: var(--r-sm);
  overflow-x: auto;
}
.notes-render pre code {
  padding: 0;
  background: transparent;
  color: var(--tx-body);
}
.notes-render a {
  color: var(--brand-lit);
  text-decoration: underline;
}
.notes-render blockquote {
  margin: 0 0 8px;
  padding: 4px 12px;
  border-left: 3px solid var(--brand);
  color: var(--tx-mute);
  background: var(--brand-film);
}
.notes-render input[type="checkbox"] { margin-right: 6px; }
.notes-render hr {
  margin: 8px 0;
  border: 0;
  border-top: 1px solid var(--line-soft);
}
.notes-render table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 8px;
}
.notes-render th, .notes-render td {
  padding: 5px 10px;
  border: 1px solid var(--line-hair);
}
.notes-render th { background: var(--card-header-bg, var(--bg-800)); }
