:root {
  --theme-primary: var(--blue, #007aff);
  --theme-primary-rgb: 0, 122, 255;
  --theme-on-primary: #fff;
}

/* Accent controls follow the configured theme / 强调控件统一跟随后台配置的主题色 */
.cat-pill.active,
.btn-sign,
.btn-block-primary.blue,
.btn-dl-install,
.tab-item.active {
  color: var(--theme-on-primary, #fff);
}
.tab-item.active { color: var(--theme-primary, #007aff); }
.cat-pill.active,
.btn-sign,
.btn-block-primary.blue,
.btn-dl-install { background: var(--theme-primary, #007aff); }
.cat-pill.active { box-shadow: 0 3px 9px rgba(var(--theme-primary-rgb), .26); }
.app-card-btn,
.copy-btn-small,
.pick-btn { color: var(--theme-primary, #007aff); background: rgba(var(--theme-primary-rgb), .10); }
.app-card-btn:active,
.copy-btn-small:active,
.pick-btn:active { background: rgba(var(--theme-primary-rgb), .18); }
.search-box:focus-within { border-color: rgba(var(--theme-primary-rgb), .38); box-shadow: 0 4px 14px rgba(var(--theme-primary-rgb), .14); }
.up-row.drag { background: rgba(var(--theme-primary-rgb), .06); }
.zsign-option .zo-input:focus { box-shadow: 0 0 0 2px rgba(var(--theme-primary-rgb), .20); }
.zsign-option .zo-input:disabled,
.zsign-option .pick-btn:disabled { cursor: not-allowed; opacity: .55; }
.zsign-option .zo-input:disabled { background: var(--fill, #f2f2f7); }
.doc-body .highlight { background: rgba(var(--theme-primary-rgb), .08); border-left-color: var(--theme-primary, #007aff); }
.tut-tag-blue { background: rgba(var(--theme-primary-rgb), .12); color: var(--theme-primary, #007aff); }
.card-sign-trigger { background: linear-gradient(120deg, var(--theme-primary, #007aff), color-mix(in srgb, var(--theme-primary, #007aff) 72%, #7357f5)) !important; color: var(--theme-on-primary, #fff) !important; }
.card-sign-submit { background: var(--theme-primary, #007aff) !important; color: var(--theme-on-primary, #fff) !important; }
.card-sign-progress span { background: linear-gradient(90deg, var(--theme-primary, #007aff), color-mix(in srgb, var(--theme-primary, #007aff) 65%, #36cdb8)); }
.card-sign-result a { color: var(--theme-primary, #007aff) !important; }

/* Optional per-tab page tint / 可选的各标签页主题底色 */
:root[data-theme-bg-tab] .page.active {
  background-color: color-mix(in srgb, var(--theme-primary, #007aff) 5%, var(--bg, #f2f2f7));
  transition: background-color .24s ease;
}
