/* ============================================================================
 * components.css —— SPA 化后聚合的各页面专属样式（原分散在各子页 head <style>）
 * ----------------------------------------------------------------------------
 * 由 index.html 统一引入；全局通用类（.page/.data-table/.btn/.modal 等）仍在 theme.css。
 *
 * ⚠️ 作用域纪律（合并成单文档后新增的硬性要求）：
 *   原来每个子页是独立 HTML，同名类（.field/.form-card/.toolbar/.muted…）互不干扰；
 *   合并到一个文档后，若继续写成全局选择器，后写的会覆盖先写的，甚至污染控制台。
 *   因此除「跨页共用」区块外，所有页面专属样式必须挂在页面根类下：
 *     .pg-logs / .pg-accounts / .pg-license / .pg-settings
 *     .pg-product / .pg-users / .pg-music / .pg-regcode
 *   这些根类由 index.js 中对应视图组件的根 div 提供。
 * ========================================================================== */

/* ===========================================================================
 * 〇、跨页共用（无作用域，刻意全局）
 * ========================================================================= */
.spin { animation: spin 0.8s linear infinite; }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* ---------- 头像授权提示 / 侧栏菜单 tooltip（原 index.html 内联） ---------- */
.user-info { position: relative; cursor: default; }
.license-tip {
  position: fixed; min-width: 150px; padding: 9px 13px;
  background: rgba(15, 21, 42, 0.92); color: #fff; border-radius: 12px;
  font-size: 12px; line-height: 1.6; white-space: nowrap;
  box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.35);
  pointer-events: none; z-index: 9999; opacity: 0;
  transform: translateY(6px); transition: opacity 0.18s ease, transform 0.18s ease;
}
.license-tip.visible { opacity: 1; transform: translateY(0); }
.license-tip.tip-expanded::after {
  content: ""; position: absolute; top: 100%; left: 18px; border: 6px solid transparent;
  border-top-color: rgba(15, 21, 42, 0.92);
}
.license-tip.tip-collapsed::after {
  content: ""; position: absolute; top: 50%; right: 100%; transform: translateY(-50%);
  border: 6px solid transparent; border-right-color: rgba(15, 21, 42, 0.92);
}
.license-tip .tip-row { display: flex; align-items: center; gap: 6px; }
.license-tip .tip-label { color: #94a3b8; }
.license-tip .tip-value { font-weight: 700; }
.license-tip .tip-value.expired { color: #f43f5e; }

.nav-tip {
  position: fixed; padding: 6px 13px; background: rgba(15, 21, 42, 0.92); color: #fff;
  border-radius: 10px; font-size: 13px; line-height: 1.4; white-space: nowrap;
  box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.35); pointer-events: none;
  z-index: 9999; opacity: 0; transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.nav-tip.visible { opacity: 1; transform: translateY(0); }
.nav-tip.tip-collapsed::after {
  content: ""; position: absolute; top: 50%; right: 100%; transform: translateY(-50%);
  border: 6px solid transparent; border-right-color: rgba(15, 21, 42, 0.92);
}
.nav-tip.tip-expanded::after {
  content: ""; position: absolute; top: 100%; left: 18px; border: 6px solid transparent;
  border-top-color: rgba(15, 21, 42, 0.92);
}

/* ---------- 抢购成功汇总弹窗（原 index.html 内联） ---------- */
.success-modal {
  position: fixed; top: 18px; right: 18px; z-index: 1500; width: 366px;
  max-width: calc(100vw - 36px); max-height: calc(100vh - 36px);
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 18px 48px -14px rgba(15, 23, 42, 0.4);
  overflow: hidden;
}
.success-modal .sm-header {
  display: flex; align-items: center; gap: 9px; padding: 12px 14px; color: #fff;
  background: linear-gradient(135deg, var(--success, #22c55e) 0%, #15803d 100%);
}
.success-modal .sm-emoji { font-size: 20px; line-height: 1; }
.success-modal .sm-title { font-size: 15px; font-weight: 800; letter-spacing: .01em; }
.success-modal .sm-count {
  font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}
.success-modal .sm-header-actions { margin-left: auto; display: flex; gap: 6px; }
.success-modal .sm-min, .success-modal .sm-close {
  width: 26px; height: 26px; display: grid; place-items: center; border: none;
  border-radius: 8px; background: rgba(255, 255, 255, 0.18); color: #fff; cursor: pointer;
}
.success-modal .sm-min:hover, .success-modal .sm-close:hover { background: rgba(255, 255, 255, 0.34); }
.success-modal .sm-body { flex: 1; overflow-y: auto; padding: 10px; background: var(--surface-2); min-height: 0; }
.success-modal .sm-list { display: flex; flex-direction: column; gap: 8px; }
.success-modal .sm-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
.success-modal .sm-item .sm-dot {
  width: 8px; height: 8px; border-radius: 50%; margin-top: 6px;
  background: var(--success, #22c55e); flex: 0 0 auto;
}
.success-modal .sm-item-main { flex: 1; min-width: 0; }
.success-modal .sm-device { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.success-modal .sm-meta { font-size: 12.5px; color: var(--text-muted); line-height: 1.55; }
.success-modal .sm-meta b { color: var(--success-600); font-weight: 700; }
.success-modal .sm-time { font-size: 11.5px; color: var(--text-faint); margin-top: 3px; font-variant-numeric: tabular-nums; }
.success-modal .sm-del {
  width: 26px; height: 26px; display: grid; place-items: center; border: none;
  border-radius: 8px; background: transparent; color: var(--text-faint); cursor: pointer;
}
.success-modal .sm-del:hover { background: var(--danger-bg); color: var(--danger-600); }
.success-modal .sm-empty { text-align: center; color: var(--text-faint); font-size: 13px; padding: 30px 10px; }
.success-modal .sm-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 13px; border-top: 1px solid var(--border); background: var(--surface);
}
.success-modal .sm-total { font-size: 12.5px; color: var(--text-muted); }
.success-modal .sm-clear {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
  border-radius: 9px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; transition: all .18s;
}
.success-modal .sm-clear:hover { border-color: var(--danger); color: var(--danger-600); background: var(--danger-bg); }

.success-badge {
  position: fixed; top: 18px; right: 18px; z-index: 1500;
  display: flex; align-items: center; gap: 8px; padding: 9px 15px; border: none;
  border-radius: 999px; cursor: pointer; color: #fff; font-size: 13.5px; font-weight: 700;
  background: linear-gradient(135deg, var(--success, #22c55e) 0%, #15803d 100%);
  box-shadow: 0 12px 30px -10px rgba(21, 128, 61, 0.7);
}
.success-badge:hover { filter: brightness(1.05); }
.success-badge .sb-count {
  font-size: 12px; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.26);
}
.sm-enter-active, .sm-leave-active { transition: opacity .28s var(--ease), transform .28s var(--ease); }
.sm-enter-from, .sm-leave-to { opacity: 0; transform: translateX(34px) scale(.96); }
.sm-item-enter-active { transition: opacity .35s var(--ease), transform .35s var(--ease); }
.sm-item-enter-from { opacity: 0; transform: translateY(-12px) scale(.97); }
.sm-item-leave-active { transition: opacity .2s var(--ease), transform .2s var(--ease); }
.sm-item-leave-to { opacity: 0; transform: scale(.92); }

/* ===========================================================================
 * 一、账号绑定（AccountsLinkView · .pg-accounts）
 * ========================================================================= */
.pg-accounts .user-cell { display: flex; align-items: center; gap: 10px; }
.pg-accounts .avatar-sm {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--violet) 100%);
  color: #fff; font-weight: 700; font-size: 13px; flex: 0 0 auto;
}
.pg-accounts .uname { font-weight: 600; color: var(--text); }
/* 覆盖 theme.css 全局 .toolbar 的 column 方向（控制台专用），此页需要横向单行 */
.pg-accounts .toolbar { flex-direction: row; justify-content: flex-start; align-items: center; }
.pg-accounts .toolbar .search-box { flex: 1; min-width: 200px; max-width: 320px; }
.pg-accounts .modal-sub { font-size: 13px; color: var(--text-faint); margin: -6px 0 14px; }
.pg-accounts .auth-num { color: var(--primary-700); font-size: 15px; }
.pg-accounts .dev-cell { font-size: 13px; white-space: nowrap; cursor: default; }
.pg-accounts .dev-bound { color: #2e9e5b; font-weight: 700; font-size: 15px; }
.pg-accounts .dev-auth { color: #5b3df5; font-weight: 700; font-size: 15px; }
.pg-accounts .dev-slash { margin: 0 4px; color: #cbd5e1; }
.pg-accounts .dev-unit { font-size: 12px; color: #94a3b8; margin-left: 2px; }
.pg-accounts .stats-bar { display: flex; align-items: center; gap: 16px; justify-content: flex-start; flex-wrap: wrap; }
.pg-accounts .count-badge {
  display: inline-flex; align-items: baseline; gap: 4px;
  padding: 8px 18px; border-radius: var(--radius, 12px);
  background: linear-gradient(135deg, var(--primary) 0%, var(--violet) 100%);
  color: #fff; font-weight: 800; line-height: 1;
}
.pg-accounts .count-badge .cur { font-size: 28px; }
.pg-accounts .count-badge .sep { font-size: 18px; opacity: 0.7; }
.pg-accounts .count-badge .max { font-size: 18px; opacity: 0.9; }
.pg-accounts .count-meta { display: flex; flex-direction: column; gap: 3px; }
.pg-accounts .count-label { font-size: 13px; color: var(--text-faint, #888); }
.pg-accounts .count-hint { font-size: 12px; color: var(--danger-600, #e5484d); }
.pg-accounts .sub-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; margin-bottom: 14px; border-radius: var(--radius, 12px);
  background: rgba(91, 61, 245, 0.08); border: 1px solid rgba(91, 61, 245, 0.25);
  color: var(--text); font-size: 13px;
}
.pg-accounts .sub-banner i { color: var(--violet, #5b3df5); font-size: 16px; }
.pg-accounts .sub-banner b { color: var(--violet, #5b3df5); }
@media (max-width: 640px) {
  .pg-accounts .page-title small { display: none; }
  .pg-accounts .page-header { flex-wrap: wrap; gap: 10px; }
  .pg-accounts .page-header .btn { flex: 1; min-width: 0; }
  .pg-accounts .stats-bar { gap: 12px; }
  .pg-accounts .count-badge { padding: 7px 14px; }
  .pg-accounts .count-badge .cur { font-size: 24px; }
  .pg-accounts .sub-banner { font-size: 12px; }
  .pg-accounts .toolbar { flex-direction: column; align-items: stretch; }
  .pg-accounts .toolbar .search-box { max-width: none; width: 100%; }
  .pg-accounts .data-table thead { display: none; }
  .pg-accounts .data-table, .pg-accounts .data-table tbody,
  .pg-accounts .data-table tr, .pg-accounts .data-table td { display: block; width: 100%; }
  .pg-accounts .data-table tr {
    background: var(--surface, #fff); border: 1px solid var(--border, #e5e9f2);
    border-radius: var(--radius, 12px); padding: 10px 12px; margin-bottom: 10px;
  }
  .pg-accounts .data-table td {
    display: flex; flex-direction: row; align-items: center;
    justify-content: space-between; gap: 12px; padding: 5px 0; border: none; text-align: right;
  }
  .pg-accounts .data-table td[data-label]::before {
    content: attr(data-label); font-size: 12px; color: var(--text-faint, #888);
    font-weight: 600; text-align: left; flex: 0 0 auto;
  }
  .pg-accounts .data-table td[data-label="账号"] { justify-content: flex-start; }
  .pg-accounts .data-table td[data-label="操作"] { justify-content: flex-end; }
  .pg-accounts .data-table td[data-label="操作"] .actions-cell { justify-content: flex-end; }
  .pg-accounts .modal { width: calc(100% - 28px); max-width: none; max-height: 92vh; overflow-y: auto; }
  .pg-accounts .modal-actions { flex-direction: column; }
  .pg-accounts .modal-actions .btn { width: 100%; }
  .pg-accounts .form-row input { width: 100%; }
}

/* ===========================================================================
 * 二、授权管理（LicenseView · .pg-license）
 * ========================================================================= */
.pg-license .summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.pg-license .summary-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius, 14px); box-shadow: var(--shadow-sm); padding: 16px 18px;
}
.pg-license .sc-label { font-size: 12.5px; color: var(--text-faint); margin-bottom: 8px; }
.pg-license .sc-value { font-size: 24px; font-weight: 800; color: var(--text); line-height: 1.2; }
.pg-license .sc-value small { font-size: 13px; font-weight: 600; color: var(--text-faint); margin-left: 2px; }
.pg-license .badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.pg-license .badge-active { color: #16a34a; background: rgba(22,163,74,.12); }
.pg-license .badge-expired { color: #ef4444; background: rgba(239,68,68,.12); }
.pg-license .form-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 14px);
  box-shadow: var(--shadow-sm); padding: 8px 22px; max-width: 760px; margin-bottom: 18px;
}
.pg-license .field-group-title {
  padding: 14px 0 6px; font-size: 12px; font-weight: 700; color: var(--violet, #5b3df5);
  letter-spacing: .5px; text-transform: uppercase; border-bottom: 1px solid var(--border);
}
.pg-license .field { display: flex; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.pg-license .field:last-child { border-bottom: none; }
.pg-license .field-label { flex: 0 0 90px; font-weight: 600; color: var(--text); font-size: 14px; }
.pg-license .field-control { flex: 1; display: flex; align-items: center; gap: 12px; }
.pg-license .code-input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface-2); color: var(--text); font-size: 15px; letter-spacing: 1px; text-transform: uppercase;
}
.pg-license .code-input:focus { outline: none; border-color: var(--primary, #5b3df5); }
.pg-license .muted { color: var(--text-faint); font-size: 12.5px; margin-top: 12px; line-height: 1.6; }
.pg-license .cards-section { max-width: 760px; }
.pg-license .empty {
  padding: 26px; text-align: center; color: var(--text-faint); font-size: 13.5px;
  background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius, 14px);
}
.pg-license .license-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 14px);
  box-shadow: var(--shadow-sm); padding: 16px 18px; margin-bottom: 12px;
}
.pg-license .license-card.is-banned { opacity: .6; }
.pg-license .lc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pg-license .lc-id { font-weight: 700; color: var(--text); font-size: 14px; }
.pg-license .lc-body { display: flex; flex-direction: column; gap: 7px; }
.pg-license .lc-row { display: flex; justify-content: space-between; font-size: 13.5px; }
.pg-license .lc-k { color: var(--text-faint); }
.pg-license .lc-v { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .pg-license .summary-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pg-license .summary-card { padding: 12px 14px; }
  .pg-license .sc-value { font-size: 21px; }
  .pg-license .sc-value small { font-size: 12px; }
  .pg-license .form-card { padding: 4px 14px; }
  .pg-license .field { flex-direction: column; align-items: stretch; gap: 8px; padding: 14px 0; }
  .pg-license .field-label { flex: none; }
  .pg-license .field-control { flex-direction: column; align-items: stretch; gap: 10px; }
  .pg-license .code-input { width: 100%; }
  .pg-license .btn { width: 100%; justify-content: center; }
  .pg-license .page-title small { display: none; }
  .pg-license .license-card { padding: 14px 14px; }
}

/* ===========================================================================
 * 三、注册码管理（RegcodeView · .pg-regcode）
 * ========================================================================= */
.pg-regcode .gen-card {
  background: var(--surface, #fff); border-radius: 16px; padding: 18px 20px;
  margin-bottom: 18px; box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}
.pg-regcode .gen-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; align-items: end; }
.pg-regcode .gen-grid .form-row { margin-bottom: 0; }
.pg-regcode .gen-grid .form-row input { width: 100%; box-sizing: border-box; }
.pg-regcode .gen-actions { margin-top: 16px; display: flex; gap: 10px; }
.pg-regcode .result-area { margin-top: 16px; border-top: 1px dashed #e2e8f0; padding-top: 14px; }
.pg-regcode .code-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pg-regcode .code-chip {
  display: inline-flex; align-items: center; gap: 8px; background: #eef2ff; color: #4338ca;
  border: 1px solid #c7d2fe; border-radius: 10px; padding: 7px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; font-size: 14px;
}
.pg-regcode .code-chip .copy { cursor: pointer; color: #6366f1; border: none; background: none; font-size: 13px; }
.pg-regcode .filter-bar { margin-bottom: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pg-regcode .filter-bar select { padding: 8px 10px; border-radius: 10px; border: 1px solid #e2e8f0; background: #f8fafc; font-size: 13px; }
.pg-regcode .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; letter-spacing: 0.5px; }
.pg-regcode .data-table .copyable-code { cursor: pointer; border-bottom: 1px dashed transparent; transition: color 0.15s, border-color 0.15s; }
.pg-regcode .data-table .copyable-code:hover { color: var(--accent, #4f8cff); border-bottom-color: var(--accent, #4f8cff); }
@media (max-width: 640px) {
  .pg-regcode .filter-bar { flex-direction: column; align-items: stretch; }
  .pg-regcode .filter-bar select, .pg-regcode .filter-bar .muted { width: 100%; }
  .pg-regcode .table-wrap { overflow-x: visible; }
  .pg-regcode .data-table thead { display: none; }
  .pg-regcode .data-table, .pg-regcode .data-table tbody,
  .pg-regcode .data-table tr, .pg-regcode .data-table td { display: block; width: 100%; }
  .pg-regcode .data-table tr {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    margin-bottom: 12px; padding: 4px 12px; box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.06));
  }
  .pg-regcode .data-table td {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 9px 0; border-bottom: 1px solid var(--border); text-align: right;
  }
  .pg-regcode .data-table td:last-child { border-bottom: none; }
  .pg-regcode .data-table td::before {
    content: attr(data-label); font-weight: 600; color: var(--text-faint);
    font-size: 12.5px; text-align: left; flex: 0 0 auto;
  }
  .pg-regcode .data-table td[colspan] { justify-content: center; }
  .pg-regcode .data-table td[colspan]::before { display: none; }
}

/* ===========================================================================
 * 四、抢购记录（LogsView · .pg-logs）
 * ========================================================================= */
.pg-logs .owner-tag {
  font-size: 12px; padding: 2px 8px; border-radius: 6px;
  background: rgba(79,140,255,.14); color: var(--accent, #4f8cff); white-space: nowrap;
}
.pg-logs .owner-tag.owner-muted { background: rgba(127,127,127,.14); color: var(--text-faint); }
.pg-logs .scope-toggle {
  margin-left: auto; display: inline-flex; border: 1px solid rgba(127,127,127,.28);
  border-radius: 8px; overflow: hidden; align-self: center;
}
.pg-logs .scope-toggle button {
  border: none; background: transparent; padding: 5px 16px; cursor: pointer;
  color: var(--text-faint); font-size: 13px; transition: background .15s;
}
.pg-logs .scope-toggle button.active { background: var(--accent, #4f8cff); color: #fff; }
@media (max-width: 640px) {
  .pg-logs .filter-bar { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; }
  .pg-logs .filter-bar label { justify-content: flex-start; }
  .pg-logs .filter-bar input, .pg-logs .filter-bar select { width: 100%; min-width: 0; }
  .pg-logs .filter-bar .filter-actions { display: flex; gap: 10px; }
  .pg-logs .filter-bar .filter-actions .btn { flex: 1; }
  .pg-logs .scope-toggle { margin-left: 0; align-self: stretch; }
  .pg-logs .scope-toggle button { flex: 1; }
  .pg-logs .stats-bar { flex-direction: column; align-items: flex-start; gap: 4px; }
  .pg-logs .table-wrap { overflow: visible; border: none; background: transparent; box-shadow: none; }
  .pg-logs table.data-table, .pg-logs table.data-table tbody,
  .pg-logs table.data-table tr, .pg-logs table.data-table td { display: block; width: 100%; }
  .pg-logs table.data-table thead { display: none; }
  .pg-logs table.data-table tr {
    margin-bottom: 12px; border: 1px solid var(--border); border-radius: 12px;
    background: var(--surface); box-shadow: var(--shadow-sm);
  }
  .pg-logs table.data-table tbody td {
    border: none; padding: 10px 14px; display: flex; justify-content: space-between;
    align-items: center; gap: 12px; text-align: right;
  }
  .pg-logs table.data-table tbody td::before {
    content: attr(data-label); font-weight: 600; color: var(--text-faint);
    font-size: 12.5px; text-align: left; flex: 0 0 auto;
  }
  .pg-logs table.data-table tbody td[colspan] { display: block; text-align: center; }
  .pg-logs table.data-table tbody td[colspan]::before { content: none; }
  .pg-logs .pagination { justify-content: center; gap: 8px; }
  .pg-logs .pagination .page-info { width: 100%; text-align: center; margin: 2px 0; }
}

/* ===========================================================================
 * 五、产品管理（ProductView · .pg-product）
 * ========================================================================= */
@media (max-width: 640px) {
  .pg-product .page-title small { display: none; }
  .pg-product .page-header { flex-wrap: wrap; gap: 10px; }
  .pg-product .header-actions { display: flex; flex: 1; gap: 10px; }
  .pg-product .header-actions .btn { flex: 1; min-width: 0; }
  .pg-product .data-table thead { display: none; }
  .pg-product .data-table, .pg-product .data-table tbody,
  .pg-product .data-table tr, .pg-product .data-table td { display: block; width: 100%; }
  .pg-product .data-table tr {
    background: var(--surface, #fff); border: 1px solid var(--border, #e5e9f2);
    border-radius: var(--radius, 12px); padding: 10px 12px; margin-bottom: 10px;
  }
  .pg-product .data-table td {
    display: flex; flex-direction: row; align-items: center; justify-content: space-between;
    gap: 12px; padding: 5px 0; border: none; text-align: right;
  }
  .pg-product .data-table td[data-label]::before {
    content: attr(data-label); font-size: 12px; color: var(--text-faint, #888);
    font-weight: 600; text-align: left; flex: 0 0 auto;
  }
  .pg-product .data-table td.cell-kw { white-space: normal; word-break: break-all; }
  .pg-product .data-table td[data-label="操作"] { justify-content: flex-end; }
  .pg-product .data-table td[data-label="操作"] .actions-cell { justify-content: flex-end; }
  .pg-product .modal { width: calc(100% - 28px); max-width: none; max-height: 92vh; overflow-y: auto; }
  .pg-product .modal-actions { flex-direction: column; }
  .pg-product .modal-actions .btn { width: 100%; }
  .pg-product .form-row input, .pg-product .form-row select { width: 100%; }
}

/* ===========================================================================
 * 六、音乐管理（MusicView · .pg-music）
 * ========================================================================= */
/* 覆盖 theme.css 全局 .toolbar 的 column 方向 */
.pg-music .toolbar { display: flex; flex-direction: row; align-items: center; gap: 12px; margin-bottom: 14px; }
.pg-music .mode-tabs {
  display: inline-flex; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 3px; gap: 3px;
}
.pg-music .mode-tabs button {
  border: none; background: transparent; color: var(--text-muted); padding: 7px 16px;
  border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .18s;
}
.pg-music .mode-tabs button.active { background: var(--primary, #5b3df5); color: #fff; box-shadow: var(--shadow-sm); }
.pg-music .file-drop {
  border: 1.5px dashed var(--border-strong); border-radius: 12px; padding: 18px;
  text-align: center; color: var(--text-muted); font-size: 13px; cursor: pointer; transition: all .18s;
}
.pg-music .file-drop:hover { border-color: var(--primary, #5b3df5); color: var(--primary-700, #5b3df5); }
.pg-music .file-drop.has-file { border-style: solid; border-color: var(--success, #22c55e); color: var(--success-600, #16a34a); }
.pg-music .file-name { font-weight: 700; }
.pg-music .preview-link { color: var(--primary-700, #5b3df5); word-break: break-all; }
.pg-music td .fname { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--text-muted); }
.pg-music td .remark {
  display: inline-block; max-width: 160px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: var(--text-muted); font-size: 12.5px;
}
.pg-music .modal h2 small { display: block; font-size: 12px; color: var(--text-muted); font-weight: normal; margin-top: 4px; }
@media (max-width: 640px) {
  .pg-music .page-title small { display: none; }
  .pg-music .page-header { flex-wrap: wrap; gap: 10px; }
  .pg-music .page-header .btn { flex: 1; min-width: 0; }
  .pg-music .data-table thead { display: none; }
  .pg-music .data-table, .pg-music .data-table tbody,
  .pg-music .data-table tr, .pg-music .data-table td { display: block; width: 100%; }
  .pg-music .data-table tr {
    background: var(--surface, #fff); border: 1px solid var(--border, #e5e9f2);
    border-radius: var(--radius, 12px); padding: 10px 12px; margin-bottom: 10px;
  }
  .pg-music .data-table td {
    display: flex; flex-direction: row; align-items: center; justify-content: space-between;
    gap: 12px; padding: 5px 0; border: none; text-align: right;
  }
  .pg-music .data-table td[data-label]::before {
    content: attr(data-label); font-size: 12px; color: var(--text-faint, #888);
    font-weight: 600; text-align: left; flex: 0 0 auto;
  }
  .pg-music .data-table td[data-label="名称"] { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
  .pg-music .data-table td[data-label="名称"] > * { overflow-wrap: anywhere; }
  .pg-music .data-table td[data-label="地址 / 试听"] { flex-direction: column; align-items: stretch; gap: 4px; }
  .pg-music .data-table td[data-label="地址 / 试听"] .preview-link { text-align: left; }
  .pg-music .data-table td[data-label="操作"] { justify-content: flex-end; }
  .pg-music .data-table td[data-label="操作"] .actions-cell { justify-content: flex-end; }
  .pg-music .modal { width: calc(100% - 28px); max-width: none; max-height: 92vh; overflow-y: auto; }
  .pg-music .modal-actions { flex-direction: column; }
  .pg-music .modal-actions .btn { width: 100%; }
  .pg-music .mode-tabs { width: 100%; }
  .pg-music .mode-tabs button { flex: 1; padding: 7px 8px; }
  .pg-music .form-row input { width: 100%; }
  .pg-music .file-drop { width: 100%; }
}

/* ===========================================================================
 * 七、参数设置（SettingsView · .pg-settings）
 * ========================================================================= */
.pg-settings .sub-banner {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: 16px;
  border-radius: var(--radius, 12px); background: rgba(91, 61, 245, 0.08);
  border: 1px solid rgba(91, 61, 245, 0.25); color: var(--text); font-size: 13px;
}
.pg-settings .sub-banner i { color: var(--violet, #5b3df5); font-size: 16px; }
.pg-settings .form-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 14px);
  box-shadow: var(--shadow-sm); padding: 8px 24px; max-width: 960px;
}
.pg-settings .form-card.disabled { opacity: 0.55; }
.pg-settings .field {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.pg-settings .field:last-child { border-bottom: none; }
.pg-settings .field-label-block { min-width: 160px; }
.pg-settings .field-label { font-weight: 600; color: var(--text); font-size: 14px; line-height: 1.35; }
.pg-settings .field-desc { font-size: 12.5px; color: var(--text-faint); margin-top: 3px; line-height: 1.5; }
.pg-settings .field-control {
  flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 12px; max-width: 560px;
}
.pg-settings .field-control input[type="range"] { flex: 1; min-width: 0; accent-color: var(--primary, #5b3df5); }
.pg-settings .field-control .num {
  width: 60px; padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: 9px;
  background: var(--surface-2); color: var(--text); font-size: 14px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.pg-settings .field-control select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 9px;
  background: var(--surface-2); color: var(--text); font-size: 14px;
}
.pg-settings .switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; }
.pg-settings .switch input { opacity: 0; width: 0; height: 0; }
.pg-settings .switch .slider {
  position: absolute; inset: 0; cursor: pointer; border-radius: 999px;
  background: var(--border-strong, #cbd5e1); transition: background .25s var(--ease, ease);
}
.pg-settings .switch .slider::before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .25s var(--ease, ease);
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.pg-settings .switch .slider.active { background: linear-gradient(135deg, var(--primary) 0%, var(--violet) 100%); }
.pg-settings .switch .slider.active::before { transform: translateX(20px); }
.pg-settings .switch input:disabled + .slider { opacity: .5; cursor: not-allowed; }
.pg-settings .find-color-warn {
  margin-top: 10px; padding: 8px 12px; border-left: 3px solid #f59e0b; border-radius: 0 8px 8px 0;
  background: rgba(245, 158, 11, 0.08); color: #92400e; font-size: 12px; line-height: 1.6;
}
.pg-settings .range-intro { padding: 12px 0 2px; font-size: 12.5px; color: var(--text-secondary, var(--text-faint)); line-height: 1.7; }
.pg-settings .range-example {
  margin-top: 10px; padding: 10px 14px; border-radius: 9px; background: var(--surface-2);
  color: var(--text-secondary); font-size: 12.5px; line-height: 1.8;
}
.pg-settings .range-example b { color: var(--primary-700, #4338ca); font-weight: 700; }
.pg-settings .range-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 16px 0 6px; }
.pg-settings .range-item { display: flex; flex-direction: column; gap: 8px; }
.pg-settings .range-item-label { font-size: 13px; font-weight: 600; color: var(--text); }
.pg-settings .range-row { display: flex; align-items: center; gap: 10px; }
.pg-settings .range-row input[type="range"] { flex: 1; min-width: 0; accent-color: var(--primary, #5b3df5); }
.pg-settings .rng-num {
  display: inline-flex; align-items: center; gap: 3px; padding: 4px 10px;
  border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-2);
  font-size: 13px; font-weight: 600; color: var(--text-faint);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pg-settings .rng-num .rng-val {
  width: 48px; border: none; background: transparent; outline: none;
  color: var(--primary, #5b3df5); font-weight: 700; font-size: 14px; text-align: center;
  padding: 0; font-variant-numeric: tabular-nums; -moz-appearance: textfield;
}
.pg-settings .rng-num .rng-val::-webkit-outer-spin-button,
.pg-settings .rng-num .rng-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pg-settings .rng-num .rng-val.invalid { color: #e24b4a; }
.pg-settings .range-err { color: #e24b4a; font-size: 12px; margin-top: 4px; }
.pg-settings .range-section.disabled { opacity: 0.45; pointer-events: none; }
.pg-settings .muted { color: var(--text-faint); font-size: 12.5px; margin-top: 14px; line-height: 1.6; text-align: center; }
.pg-settings .modal-mask {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.45); backdrop-filter: blur(3px); padding: 20px;
}
.pg-settings .modal-box {
  width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius, 16px); box-shadow: var(--shadow-lg, 0 20px 60px rgba(0,0,0,.3));
  padding: 24px 22px; text-align: center;
}
.pg-settings .modal-icon { font-size: 34px; color: #fc4a1a; margin-bottom: 6px; }
.pg-settings .modal-box h3 { margin: 0 0 12px; font-size: 17px; color: var(--text); }
.pg-settings .modal-box p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.6; color: var(--text); }
.pg-settings .modal-warn { color: #d9480f; font-weight: 600; }
.pg-settings .modal-dl { margin-top: 10px; }
.pg-settings .modal-box .modal-actions { display: flex; gap: 12px; margin-top: 18px; }
.pg-settings .modal-box .modal-actions .btn { flex: 1; }
@media (max-width: 760px) {
  .pg-settings .page-title small { display: none; }
  .pg-settings .sub-banner { font-size: 12.5px; padding: 8px 12px; }
  .pg-settings .form-card { padding: 4px 16px; max-width: 100%; }
  .pg-settings .field { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px 0; }
  .pg-settings .field-control { justify-content: flex-start; max-width: none; }
  .pg-settings .field-control input[type="range"] { flex: 1; }
  .pg-settings .range-grid { grid-template-columns: 1fr; gap: 16px; padding: 12px 0 2px; }
}
@media (max-width: 480px) { .pg-settings .field-control { flex-wrap: wrap; } }

/* ===========================================================================
 * 八、用户管理（UsersView · .pg-users）
 * ========================================================================= */
.pg-users .user-cell { display: flex; flex-direction: column; gap: 2px; }
.pg-users .user-cell .uname { font-weight: 700; color: var(--text); }
.pg-users .user-cell .usub { font-size: 11.5px; color: var(--text-faint); }
/* 覆盖 theme.css 全局 .toolbar 的 column 方向 */
.pg-users .toolbar {
  display: flex; flex-direction: row; gap: 14px; align-items: center;
  flex-wrap: wrap; justify-content: flex-start; margin-bottom: 16px;
}
.pg-users .toolbar .search-box { flex: 0 1 320px; min-width: 200px; }
.pg-users .toolbar .total { margin-left: auto; font-weight: 600; font-size: 13.5px; color: var(--text-muted); }
.pg-users .toolbar .total span { color: var(--primary-700); }
.pg-users .checkbox-label { flex-direction: row !important; align-items: center; gap: 8px !important; }
.pg-users .checkbox-label input { width: auto; }
/* 详情弹窗（原 users.html 未定义样式，SPA 化时补齐，避免 span/b 行内堆叠） */
.pg-users .detail-list { display: flex; flex-direction: column; gap: 2px; }
.pg-users .detail-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px;
}
.pg-users .detail-row:last-child { border-bottom: none; }
.pg-users .detail-row > span { color: var(--text-faint); flex: 0 0 auto; }
.pg-users .detail-row > b { color: var(--text); font-weight: 600; text-align: right; word-break: break-all; }
.pg-users .form-divider { border: none; border-top: 1px solid var(--border); margin: 16px 0 12px; }
.pg-users .form-subtitle { font-size: 12px; font-weight: 700; color: var(--violet, #5b3df5); letter-spacing: .5px; margin-bottom: 6px; }
.pg-users .ban-panel {
  margin-top: 18px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm);
}
.pg-users .ban-head { cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.pg-users .ban-head h3 { margin: 0; font-size: 16px; }
.pg-users .ban-body { margin-top: 12px; }
@media (max-width: 640px) {
  .pg-users .page-title small { display: none; }
  .pg-users .toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .pg-users .toolbar .search-box { flex: 1 1 auto; min-width: 0; width: 100%; }
  .pg-users .toolbar .total { margin-left: 0; font-size: 12px; }
  .pg-users .table-wrap { overflow-x: visible; }
  .pg-users .data-table thead { display: none; }
  .pg-users .data-table, .pg-users .data-table tbody,
  .pg-users .data-table tr, .pg-users .data-table td { display: block; width: 100%; }
  .pg-users .data-table tr {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    margin-bottom: 12px; padding: 4px 12px; box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.06));
  }
  .pg-users .data-table td {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 9px 0; border-bottom: 1px solid var(--border); text-align: right;
  }
  .pg-users .data-table td:last-child { border-bottom: none; }
  .pg-users .data-table td::before {
    content: attr(data-label); font-weight: 600; color: var(--text-faint);
    font-size: 12.5px; text-align: left; flex: 0 0 auto;
  }
  .pg-users .data-table td[colspan] { justify-content: center; }
  .pg-users .data-table td[colspan]::before { display: none; }
  .pg-users .modal { width: 100%; max-width: 100%; padding: 18px 16px; margin: 10px; }
  .pg-users .modal h2 { font-size: 16px; }
}

/* ===========================================================================
 * 九、登录视图（LoginView · 类名唯一，无需作用域）
 * ========================================================================= */
.app-bottom-stack {
  position: fixed; left: 14px; bottom: 14px; z-index: 60;
  display: flex; flex-direction: column; gap: 10px; max-width: 360px;
}
.app-help-bar {
  display: flex; flex-direction: column; gap: 10px; max-width: min(340px, calc(100vw - 28px));
  padding: 9px 13px; border-radius: var(--radius);
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  box-shadow: 0 6px 18px rgba(234,88,12,.12); border: 1px solid #fdba74;
  color: #9a3412; font-size: 13px; line-height: 1.65; animation: alertFade .4s ease both;
}
@keyframes alertFade { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.ahb-row { display: flex; align-items: flex-start; gap: 9px; }
.ahb-row > i.bi { font-size: 18px; color: #ea580c; flex: 0 0 auto; margin-top: 1px; }
.ahb-text { flex: 1 1 auto; }
.app-help-bar b { color: #c2410c; }
.app-help-bar .la-link { color: var(--primary, #5b3df5); font-weight: 700; cursor: pointer; }
.ahb-actions { display: flex; justify-content: flex-end; }
.app-bottom-stack .app-download-bar { position: static; left: auto; bottom: auto; }
.app-bottom-stack .app-help-bar, .app-bottom-stack .app-download-bar { position: relative; }
.app-bottom-stack .app-help-bar { padding-right: 30px; }
.ahb-close, .adb-close {
  position: absolute; top: 6px; right: 8px; width: 24px; height: 24px; padding: 0;
  border: none; background: transparent; font-size: 17px; line-height: 1; color: inherit;
  opacity: .5; border-radius: 7px; display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer; transition: opacity .15s, background .15s;
}
.ahb-close:hover, .adb-close:hover { opacity: 1; background: rgba(0,0,0,.07); }

.help-open-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none;
  font-size: 13px; font-weight: 700; color: #fff; background: var(--primary, #5b3df5);
  padding: 7px 12px; border-radius: 9px; box-shadow: 0 4px 12px rgba(91,61,245,.28);
  transition: filter .15s ease, transform .15s ease; flex: 0 0 auto;
}
.help-open-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
/* SPA 化后由 v-if 控制显隐，不再用 checkbox hack，故直接 display:flex */
.help-overlay {
  position: fixed; inset: 0; z-index: 9999; background: rgba(15, 23, 42, .55);
  display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px);
}
.help-overlay-bg { position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.help-modal {
  position: relative; z-index: 2; background: #fff; color: #1f2937; width: 100%;
  max-width: 760px; max-height: 88vh; overflow: auto; border-radius: 18px;
  padding: 30px 34px; box-shadow: 0 24px 70px rgba(0,0,0,.35); animation: helpPop .25s ease;
}
@keyframes helpPop { from { transform: translateY(16px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.help-close { position: absolute; top: 14px; right: 16px; cursor: pointer; font-size: 20px; color: #94a3b8; line-height: 1; }
.help-close:hover { color: #475569; }
.help-content h2 { font-size: 20px; margin: 0 0 6px; color: #111827; }
.help-content h3 { font-size: 15px; margin: 22px 0 8px; color: var(--primary, #5b3df5); border-left: 3px solid var(--primary, #5b3df5); padding-left: 8px; }
.help-content p { margin: 6px 0; line-height: 1.7; font-size: 13.5px; }
.help-content ul, .help-content ol { margin: 6px 0; padding-left: 22px; font-size: 13.5px; line-height: 1.7; }
.help-content li { margin: 3px 0; }
.help-content code { background: #f1f5f9; padding: 1px 6px; border-radius: 5px; font-size: 12.5px; color: #be123c; }
.help-content table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.help-content th, .help-content td { border: 1px solid #e2e8f0; padding: 7px 10px; text-align: left; }
.help-content th { background: #f8fafc; font-weight: 700; }
.help-content blockquote { margin: 10px 0; padding: 10px 14px; border-radius: 10px; background: #fff7ed; color: #9a3412; font-size: 13px; border-left: 3px solid #fb923c; }
.help-content blockquote.help-ok { background: #ecfdf5; color: #047857; border-left-color: #34d399; }
.help-tip { background: #eff6ff; color: #1e40af; padding: 10px 14px; border-radius: 10px; border-left: 3px solid #60a5fa; font-size: 13px; margin: 8px 0; }

/* ===========================================================================
 * 十、大屏监控（MonitorView iframe 容器）
 * ========================================================================= */
/* 大屏监控：iframe 100% 占满容器，由 monitor.html 自身响应式布局适配 */
.monitor-wrap { position: absolute; inset: 0; overflow: hidden; }
.monitor-frame { width: 100%; height: 100%; border: none; display: block; }
