/* ============================================================================
 * 监督投诉组件样式（v3.59，2026-09-12）
 * 依赖 member-center.css 的基础组件（.hnbmxh-card / .hnbmxh-field / .hnbmxh-btn
 * / .hnbmxh-consent / .hnbmxh-steps / .hnbmxh-fieldset），本文件只写投诉特有部分。
 * 视觉与全站统一：复用 :root 设计变量。
 *
 * 2026-09-12 改版要点（用户反馈"太丑"）：
 *   旧版所有字段 grid-column:1/-1 通铺 → 单个输入框宽达 1134px，像一张白纸平铺。
 *   现在改为：短字段成对两列、长文本才通栏，并加强输入框的边框/高度/聚焦态。
 * ============================================================================ */

/* ---------- 卡片与须知条 ---------- */
.hnbmxh-complaint { padding: 30px 32px; }
.hnbmxh-complaint-notice { margin-bottom: 20px; }
.hnbmxh-complaint-notice .hnbmxh-secret-more { margin-top: 8px; font-size: 15px; }

/* 步骤条做成一条浅底通栏，和表单区分开 */
.hnbmxh-complaint .hnbmxh-steps {
  margin: 18px 0 6px;
  padding: 14px 18px;
  background: var(--c-bg);
  border-radius: var(--radius-sm);
}

/* ---------- 表单骨架 ---------- */
.hnbmxh-complaint-form { gap: 18px 22px; }

/* 默认通栏（textarea、长字段），短字段用 --half / pair 收窄 */
.hnbmxh-complaint-form > .hnbmxh-field { grid-column: 1 / -1; }
.hnbmxh-complaint-form > .hnbmxh-field--half { grid-column: 1 / 2; }

/* 成对短字段：两列并排 */
.hnbmxh-complaint-pair,
.hnbmxh-complaint-ident {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 22px;
}

/* 分区标题：字号与分隔感加强 */
.hnbmxh-complaint-form .hnbmxh-fieldset {
  margin-top: 10px;
  padding-top: 20px;
  font-size: 17px;
}
.hnbmxh-complaint-form .hnbmxh-fieldset span { font-size: 14.5px; }

/* ---------- 输入控件：加高、描边、聚焦光晕 ----------
   特异性 (0,2,1) 高于 member-center.css 的 .hnbmxh-field input (0,1,1)，
   且本文件在其后加载，双重保证生效。 */
.hnbmxh-complaint-form .hnbmxh-field input,
.hnbmxh-complaint-form .hnbmxh-field select,
.hnbmxh-complaint-form .hnbmxh-field textarea {
  padding: 12px 14px;
  border: 1px solid #c6d0dc;
  border-radius: 6px;
  background: #fff;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--c-text);
  transition: border-color .15s, box-shadow .15s;
}
.hnbmxh-complaint-form .hnbmxh-field input:hover,
.hnbmxh-complaint-form .hnbmxh-field select:hover,
.hnbmxh-complaint-form .hnbmxh-field textarea:hover { border-color: #9fb0c4; }

.hnbmxh-complaint-form .hnbmxh-field input:focus,
.hnbmxh-complaint-form .hnbmxh-field select:focus,
.hnbmxh-complaint-form .hnbmxh-field textarea:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(14, 77, 164, .13);
  outline: none;
}
.hnbmxh-complaint-form .hnbmxh-field textarea { resize: vertical; min-height: 150px; }
.hnbmxh-complaint-form .hnbmxh-field label { font-weight: 600; letter-spacing: .2px; }
.hnbmxh-complaint-form .hnbmxh-field small { margin-top: 2px; }

/* ---------- 一、投诉类型（三列卡片） ---------- */
.hnbmxh-complaint-types {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 4px;
}
.hnbmxh-complaint-type {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 16px 16px 17px;
  border: 1px solid #c6d0dc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.hnbmxh-complaint-type:hover { border-color: var(--c-primary); }
.hnbmxh-complaint-type input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex: 0 0 auto;
  accent-color: var(--c-accent);
}
.hnbmxh-complaint-type__body { display: flex; flex-direction: column; gap: 4px; }
.hnbmxh-complaint-type__body b { font-size: 16px; color: var(--c-text); }
.hnbmxh-complaint-type__body small { font-size: 14px; line-height: 1.6; color: var(--c-text-soft); }
/* 选中态：:has() 支持面已足够（Safari 15.4+ / Chrome 105+），
   同时保留「文字变红」作为不支持时的降级反馈 */
.hnbmxh-complaint-type:has(input:checked) {
  border-color: var(--c-accent);
  background: #fdf7f7;
  box-shadow: 0 0 0 1px var(--c-accent) inset;
}
.hnbmxh-complaint-type input:checked ~ .hnbmxh-complaint-type__body b { color: var(--c-accent-dark); }

/* ---------- 申诉联署块（仅「会员申诉」显示） ---------- */
.hnbmxh-complaint-joint {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.hnbmxh-complaint-joint .hnbmxh-field { grid-column: 1 / -1; }

/* 两个可折叠区块。⚠️ 必须显式重申 display:none —— 上面的 display:grid
   会盖掉 UA 的 [hidden]{display:none}，导致 JS 收起后仍然显示。 */
.hnbmxh-complaint-joint[hidden],
.hnbmxh-complaint-ident[hidden] { display: none !important; }

/* ---------- 二、投诉人信息 ---------- */
.hnbmxh-complaint-anon {
  margin-bottom: 2px;
  padding: 12px 14px;
  border: 1px dashed #c6d0dc;
  border-radius: 6px;
  background: #fbfcfd;
}
.hnbmxh-complaint-ident { margin-top: 2px; }

/* ---------- 提交按钮 ---------- */
.hnbmxh-complaint-submit {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--c-border);
}
.hnbmxh-complaint-submit .hnbmxh-btn {
  min-width: 180px;
  padding: 13px 30px;
  font-size: 17px;
  letter-spacing: 2px;
}

/* ---------- 查询办理进度 ---------- */
.hnbmxh-complaint-query { margin-top: 24px; }
.hnbmxh-complaint-query__tip { font-size: 15px; color: var(--c-text-soft); line-height: 1.75; margin: 0 0 16px; }
.hnbmxh-complaint-query .hnbmxh-field { grid-column: 1 / -1; max-width: 440px; }

.hnbmxh-complaint-result {
  grid-column: 1 / -1;
  margin-top: 20px;
  padding: 20px 22px;
  border: 1px solid var(--c-border);
  border-left: 5px solid var(--c-primary);
  border-radius: 6px;
  background: var(--c-bg);
}
.hnbmxh-complaint-result__row {
  display: flex;
  gap: 14px;
  padding: 7px 0;
  font-size: 15.5px;
  border-bottom: 1px dashed var(--c-border);
}
.hnbmxh-complaint-result__row:last-of-type { border-bottom: 0; }
.hnbmxh-complaint-result__row > span { flex: 0 0 96px; color: var(--c-text-soft); }
.hnbmxh-complaint-result__row > b { color: var(--c-text); font-weight: 600; }
.hnbmxh-complaint-result__note { margin-top: 12px; font-size: 15.5px; }
.hnbmxh-complaint-result__note > span { display: block; color: var(--c-text-soft); margin-bottom: 4px; }
.hnbmxh-complaint-result__note p { margin: 0; line-height: 1.8; color: var(--c-text); }
.hnbmxh-complaint-result__tip { margin: 12px 0 0; font-size: 14.5px; color: var(--c-text-soft); line-height: 1.7; }

/* ---------- 状态标签（前台查询 + 后台列表共用） ---------- */
.hnbmxh-st {
  display: inline-block;
  padding: 2px 10px 3px;
  border-radius: 3px;
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
  background: #eef1f5;
  color: #3c434a;
}
.hnbmxh-st--pending  { background: #fdf0d5; color: #8a5a00; }
.hnbmxh-st--accepted { background: #e3eefb; color: #0e4da4; }
.hnbmxh-st--done     { background: #e6f2e9; color: #177245; }
.hnbmxh-st--rejected { background: #f4e6e6; color: #9c2a2b; }
.hnbmxh-complaint-result__row .hnbmxh-st { font-size: 15px; padding: 3px 12px 4px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  /* 三列类型卡片在中等宽度下改为纵向，避免文字被挤成竖条 */
  .hnbmxh-complaint-types { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hnbmxh-complaint { padding: 22px 18px; }
  .hnbmxh-complaint-pair,
  .hnbmxh-complaint-ident { grid-template-columns: 1fr; }
  .hnbmxh-complaint-form > .hnbmxh-field--half { grid-column: 1 / -1; }
  .hnbmxh-complaint-submit .hnbmxh-btn { width: 100%; min-width: 0; }
  .hnbmxh-complaint-result__row { flex-direction: column; gap: 2px; }
  .hnbmxh-complaint-result__row > span { flex: none; }
}

/* ---------- 附件上传（v3.65） ---------- */
.hnbmxh-complaint-upload { margin: 0; }

.hnbmxh-upload-pick {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 18px 20px;
  border: 1.5px dashed #c3cedd; border-radius: var(--radius-sm);
  background: var(--c-bg);
  cursor: pointer;
  transition: border-color .18s, background .18s;
}
.hnbmxh-upload-pick:hover { border-color: var(--c-primary); background: var(--c-primary-light); }
.hnbmxh-upload-pick:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(14, 77, 164, .12); }

/* 视觉隐藏但留在可访问性树里：键盘能 Tab 到、屏幕阅读器能读 */
.hnbmxh-upload-pick input[type="file"] {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.hnbmxh-upload-pick__btn {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 22px;
  border-radius: var(--radius-pill);
  background: var(--c-primary); color: #fff;
  font-size: 15.5px; font-weight: 600;
  box-shadow: 0 1px 2px rgba(14, 77, 164, .22);
  transition: background .18s;
}
.hnbmxh-upload-pick:hover .hnbmxh-upload-pick__btn { background: var(--c-primary-dark); }

.hnbmxh-upload-pick__meta { font-size: 14.5px; color: var(--c-text-soft); line-height: 1.6; }
.hnbmxh-upload-pick__meta b { color: var(--c-primary); font-weight: 700; }

.hnbmxh-upload-list {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.hnbmxh-upload-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  background: #fff;
  font-size: 15px;
}
.hnbmxh-upload-list__name {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--c-text);
}
.hnbmxh-upload-list__size { flex: none; color: var(--c-text-soft); font-size: 14.5px; font-variant-numeric: tabular-nums; }
.hnbmxh-upload-list__del {
  flex: none;
  border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  background: #fff; color: var(--c-text-soft);
  font-size: 14px; padding: 5px 12px; cursor: pointer;
  transition: color .16s, border-color .16s, background .16s;
}
.hnbmxh-upload-list__del:hover { color: #b32d2e; border-color: #e2b3b4; background: #fdf4f4; }

.hnbmxh-upload-note {
  margin: 10px 0 0;
  font-size: 14.5px; line-height: 1.7; color: var(--c-text-soft);
}
/* 「可上传格式」提示条：浅蓝底 + 左侧色条，让格式清单一眼可见 */
.hnbmxh-upload-note__fmt {
  margin: 10px 0 8px;
  padding: 9px 14px;
  border-left: 4px solid #2c5f9e;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: #f1f6fc;
  font-size: 14.5px; line-height: 1.7; color: var(--c-text);
}
/* 选择文件时的即时警告：独立元素，绝不覆盖上方的格式说明与加粗 */
.hnbmxh-upload-warn {
  margin: 8px 0 0;
  font-size: 14.5px; line-height: 1.7;
  color: #b32d2e; font-weight: 500;
}

@media (max-width: 640px) {
  .hnbmxh-upload-pick { padding: 16px 14px; gap: 10px; }
  .hnbmxh-upload-pick__btn { width: 100%; }
  .hnbmxh-upload-list li { flex-wrap: wrap; }
  .hnbmxh-upload-list__name { flex-basis: 100%; white-space: normal; }
}
