/* dx-glow 控件玻璃化补齐 v26112001
   问题：nv_home（个人中心）系列页与发帖页部分控件仍是 Discuz 原生样式——
        白底无圆角、灰底按钮，与全站液态玻璃卡片不统一。
   扫描证据：我的帖子3处、个人设置17处、消息1处、发帖页1处未覆盖；
        首页/论坛/帖子/搜索/统计均为0（已玻璃化）。
   修复：高特异性覆盖（nv_home 原生规则优先级高于 touch/extend_common）。
   复用 token：--dx-accent / --dx-glass-card-line-soft / --dx-shadow-1；
        本文件内的控件级 token 统一定义在 #ct 上，改一处即可全站生效。
   作用域：全站（PC+移动），只命中 #ct 内控件。 */

html:root body #ct {
  --dx-ctl-line: 1px solid var(--dx-glass-card-line-soft, rgba(255, 255, 255, .82));
  --dx-ctl-line-soft: 1px solid rgba(255, 255, 255, .46);
  --dx-ctl-radius: 12px;
  --dx-ctl-surface: rgba(255, 255, 255, .74);
  --dx-ctl-shadow: 0 4px 14px rgba(31, 58, 110, .08), inset 0 1px 0 rgba(255, 255, 255, .92);
  --dx-ctl-ink: #24303f;
  --dx-ctl-action: linear-gradient(180deg, #4a86f7, #2f6fed);
  --dx-ctl-action-shadow: 0 6px 16px rgba(47, 111, 237, .22), inset 0 1px 0 rgba(255, 255, 255, .42);
  --dx-ctl-check-line: 1px solid rgba(88, 108, 138, .42);
  --dx-ctl-check-surface: rgba(255, 255, 255, .82);
  --dx-ctl-check-shadow: inset 0 1px 2px rgba(42, 52, 68, .06);
}

html:root body #ct :is(input[type=text], input[type=password], input[type=email], input[type=search], textarea, select, .px, .ps, .pt) {
  box-sizing: border-box !important;
  min-height: 40px !important;
  padding: 0 12px !important;
  border: var(--dx-ctl-line) !important;
  border-radius: var(--dx-ctl-radius) !important;
  background: var(--dx-ctl-surface) !important;
  box-shadow: var(--dx-ctl-shadow) !important;
  color: var(--dx-ctl-ink) !important;
  font-size: 14px !important;
  outline: none !important;
  transition: border-color .18s ease, box-shadow .18s ease !important;
}

html:root body #ct :is(input[type=text], input[type=password], input[type=email], input[type=search], textarea, select, .px, .ps, .pt):focus {
  border-color: var(--dx-accent, #2f6fed) !important;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .14), var(--dx-ctl-shadow) !important;
}

html:root body #ct :is(button, input[type=submit], .pn) {
  box-sizing: border-box !important;
  min-height: 40px !important;
  padding: 0 18px !important;
  border: var(--dx-ctl-line-soft) !important;
  border-radius: var(--dx-ctl-radius) !important;
  background: var(--dx-ctl-action) !important;
  box-shadow: var(--dx-ctl-action-shadow) !important;
  color: #fff !important;
  font-size: 14px !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

html:root body #ct :is(button, input[type=submit], .pn):hover { filter: brightness(1.06) !important }

/* 发帖页标题框：保持透明融入卡片，补齐触达高度与圆角 */
html:root body.pg_post #ct input#subject {
  --dx-ctl-surface: rgba(255, 255, 255, .62);
  min-height: 54px !important;
  border-radius: var(--dx-ctl-radius) !important;
  background: var(--dx-ctl-surface) !important;
}

/* 1) 原生复选框（帖子管理勾选 / 版块管理勾选）→ 玻璃勾选框 */
html:root body #ct :is(input[type=checkbox].pc, input[type=checkbox].pcvm, input[type=checkbox][name="moderate[]"]) {
  -webkit-appearance: none !important;
  appearance: none !important;
  box-sizing: border-box !important;
  width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  border: var(--dx-ctl-check-line) !important;
  border-radius: 6px !important;
  background: var(--dx-ctl-check-surface) !important;
  box-shadow: var(--dx-ctl-check-shadow) !important;
  cursor: pointer !important;
  position: relative !important;
}

html:root body #ct td.o input[type=checkbox][name="moderate[]"] {
  width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  border-radius: 5px !important;
}

html:root body #ct :is(input[type=checkbox].pc, input[type=checkbox].pcvm, input[type=checkbox][name="moderate[]"]):checked {
  border-color: var(--dx-accent, #2f6fed) !important;
  background: var(--dx-accent, #2f6fed) !important;
}

html:root body #ct :is(input[type=checkbox].pc, input[type=checkbox].pcvm, input[type=checkbox][name="moderate[]"]):checked::after {
  content: "" !important;
  position: absolute !important;
  left: 6px !important;
  top: 2px !important;
  width: 5px !important;
  height: 10px !important;
  border: solid #fff !important;
  border-width: 0 2px 2px 0 !important;
  transform: rotate(45deg) !important;
}

html:root body #ct td.o input[type=checkbox][name="moderate[]"]:checked::after {
  left: 5px !important;
  height: 9px !important;
}

/* 2) 头像上传按钮 */
html:root body #ct :is(button#uploadavatar, input#uploadavatar) {
  min-height: 44px !important;
  border: var(--dx-ctl-line-soft) !important;
  border-radius: var(--dx-ctl-radius) !important;
  background: var(--dx-ctl-action) !important;
  box-shadow: var(--dx-ctl-action-shadow) !important;
  color: #fff !important;
}

/* 3) 站短收件人输入框（无 class，用 ID 精确命中） */
html:root body #ct input#username {
  box-sizing: border-box !important;
  min-height: 40px !important;
  padding: 0 12px !important;
  border: var(--dx-ctl-line) !important;
  border-radius: var(--dx-ctl-radius) !important;
  background: var(--dx-ctl-surface) !important;
  box-shadow: var(--dx-ctl-shadow) !important;
  color: var(--dx-ctl-ink) !important;
  font-size: 14px !important;
}
