/* ========== 反馈中心（2026-10-23；2026-11-23 对齐全站 Design Tokens） ==========
   复用 public/shared/style.css 的按钮、卡片、弹层与设计令牌；本文件只放反馈专属布局。
   移动端规范：760px 正文分界、操作区 ≥44px、输入字号 16px。 */

.fb-page { display: flex; flex-direction: column; gap: 14px; }

/* 子栏目沿用全站二级标题导航（bond-header / bond-sub-nav / bond-sub-tab），不再另写尺寸与对齐，
   否则会覆盖 .bond-sub-nav 的 align-items:stretch，导致激活下划线不贴导航条底边。
   提交入口统一由左侧全局悬浮反馈入口承担，页面内不再放「提交反馈」按钮。 */

.fb-panel { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow-xs); }

.fb-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
/* 控件外观与站内统一规范一致（同 .filter-bar / .bond-list-toolbar） */
.fb-toolbar input[type="text"], .fb-toolbar input[type="date"], .fb-toolbar select {
  height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--r-md);
  font-size: var(--fs-sm); color: var(--text-primary); background: var(--bg-surface); font-family: inherit; outline: none;
}
.fb-toolbar input[type="date"] { width: 150px; }
.fb-toolbar input[type="text"]:focus, .fb-toolbar input[type="date"]:focus, .fb-toolbar select:focus {
  border-color: var(--primary); box-shadow: var(--focus-ring);
}
.fb-toolbar input[type="text"] { min-width: 160px; flex: 0 1 260px; max-width: 300px; }
.fb-toolbar label { font-size: var(--fs-xs); color: var(--text-muted); }

.fb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.fb-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-full);
  border: 1px solid var(--border-default); background: var(--bg-surface); color: var(--text-secondary); font-size: var(--fs-xs); cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.fb-chip:hover { border-color: var(--border-hover); color: var(--text-primary); }
.fb-chip.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-text); font-weight: 600; }
.fb-chip .fb-chip-count { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.fb-chip.active .fb-chip-count { color: var(--primary-text); }

.fb-list { display: flex; flex-direction: column; gap: 10px; }
.fb-card {
  border: 1px solid var(--border-default); border-radius: var(--r-lg); padding: 14px 16px; cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); background: var(--bg-surface);
}
.fb-card:hover { border-color: var(--primary-soft-border); box-shadow: var(--shadow-sm); }
.fb-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.fb-card-no { font-size: var(--fs-xs); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.fb-card-title { font-size: var(--fs-base); font-weight: 600; color: var(--text-primary); flex: 1 1 240px; }
.fb-card-summary { font-size: var(--fs-sm); color: var(--text-secondary); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fb-card-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: var(--fs-xs); color: var(--text-muted); }
/* #42：内部账户编号是 64 位十六进制等长字符串，只在管理员详情显示，允许任意位置换行。 */
.fb-card-meta .fb-internal-account { font-family: var(--font-mono, monospace); word-break: break-all; }
.fb-card-note { margin-top: 8px; font-size: var(--fs-xs); color: var(--text-secondary); background: var(--bg-subtle); border-radius: var(--r-md); padding: 8px 10px; }

.fb-badge { display: inline-block; padding: 2px 8px; border-radius: var(--r-full); font-size: 11px; font-weight: 600; white-space: nowrap; }
.fb-badge--bug { background: var(--up-soft); color: var(--up); }
.fb-badge--improvement { background: var(--primary-soft); color: var(--primary-text); }
.fb-badge--feature { background: var(--down-soft); color: var(--down); }
.fb-badge--new { background: var(--bg-muted); color: var(--text-secondary); }
.fb-badge--needs_info { background: var(--warning-soft); color: var(--warning); }
.fb-badge--accepted { background: var(--primary-soft); color: var(--primary-text); }
.fb-badge--in_progress { background: var(--primary-soft); color: var(--primary-hover); }
.fb-badge--implemented { background: var(--down-soft); color: var(--down); }
.fb-badge--duplicate { background: var(--purple-soft); color: var(--purple); }
.fb-badge--declined { background: var(--bg-muted); color: var(--text-muted); }
.fb-badge--private { background: #fdf2f8; color: #be185d; }
.fb-badge--withdrawn { background: var(--bg-muted); color: var(--text-muted); }

.fb-empty { padding: 40px 10px; text-align: center; color: var(--text-muted); font-size: var(--fs-sm); }
.fb-error { padding: 14px; border-radius: var(--r-md); background: var(--danger-soft); color: var(--danger); font-size: var(--fs-sm); border: 1px solid var(--danger-border); }

.fb-pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; font-size: var(--fs-sm); color: var(--text-secondary); }

/* 详情 */
.fb-detail-back { margin-bottom: 10px; }
.fb-detail-title { font-size: var(--fs-lg); font-weight: 700; color: var(--text-primary); margin-bottom: 8px; line-height: 1.4; }
.fb-detail-body { font-size: var(--fs-base); color: var(--text-primary); line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.fb-detail-shots { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.fb-shot { position: relative; display: inline-block; }
.fb-shot img { max-width: 220px; max-height: 160px; border-radius: var(--r-md); border: 1px solid var(--border-default); cursor: zoom-in; display: block; }
.fb-shot-remove {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border: none; border-radius: 50%;
  background: rgba(15, 23, 42, 0.65); color: var(--text-inverse); font-size: 15px; line-height: 1; cursor: pointer;
}
.fb-section-title { font-size: var(--fs-sm); font-weight: 700; color: var(--text-primary); margin: 18px 0 10px; }

.fb-reply { border-top: 1px solid var(--border-subtle); padding-top: 12px; margin-top: 12px; }
.fb-reply-head { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--text-muted); margin-bottom: 6px; flex-wrap: wrap; }
.fb-reply-author { color: var(--text-primary); font-weight: 600; font-size: var(--fs-sm); }
.fb-reply-body { font-size: var(--fs-sm); color: var(--text-primary); line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.fb-reply.is-hidden .fb-reply-body { color: var(--text-muted); font-style: italic; }

.fb-timeline { list-style: none; margin: 0; padding: 0; font-size: var(--fs-xs); color: var(--text-secondary); }
.fb-timeline li { padding: 6px 0 6px 14px; border-left: 2px solid var(--border-default); position: relative; }
.fb-timeline li::before { content: ''; position: absolute; left: -5px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue-200); }
.fb-timeline time { color: var(--text-muted); margin-right: 8px; }

/* 表单 */
.fb-form { display: flex; flex-direction: column; gap: 14px; }
.fb-field { display: flex; flex-direction: column; gap: 6px; }
.fb-field > span { font-size: var(--fs-sm); font-weight: 600; color: var(--text-primary); }
.fb-field small { font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.5; }
.fb-field input[type="text"], .fb-field textarea, .fb-field select {
  padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--r-md); font-size: var(--fs-base);
  color: var(--text-primary); font-family: inherit; background: var(--bg-surface); outline: none;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.fb-field textarea { min-height: 140px; resize: vertical; line-height: 1.7; }
.fb-field input::placeholder, .fb-field textarea::placeholder { color: var(--text-placeholder); }
.fb-field input:focus, .fb-field textarea:focus, .fb-field select:focus {
  border-color: var(--primary); box-shadow: var(--focus-ring);
}
.fb-radio-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--text-secondary); padding-top: 8px; }
.fb-radio-row label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.fb-radio-row input[type="radio"] { accent-color: var(--primary); }
.fb-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.fb-thumb { position: relative; width: 92px; height: 92px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border-default); background: var(--bg-subtle); }
.fb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fb-thumb button {
  position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border: none; border-radius: 50%;
  background: rgba(15, 23, 42, 0.65); color: var(--text-inverse); font-size: 14px; line-height: 1; cursor: pointer;
}
.fb-upload-tip { font-size: var(--fs-xs); color: var(--text-muted); }
.fb-form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--border-subtle); }

/* 排名 */
.fb-rank-list { display: flex; flex-direction: column; gap: 8px; }
.fb-rank-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md);
  border: 1px solid var(--border-default); font-size: var(--fs-sm); background: var(--bg-surface);
}
.fb-rank-row.is-me { border-color: var(--primary-soft-border); background: var(--primary-soft); }
.fb-rank-no { width: 34px; font-weight: 700; color: var(--primary-text); font-variant-numeric: tabular-nums; }
.fb-rank-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); display: flex; align-items: center; justify-content: center; font-size: var(--fs-sm); font-weight: 600; overflow: hidden; }
.fb-rank-avatar img { width: 100%; height: 100%; object-fit: cover; }
.fb-rank-name { flex: 1; color: var(--text-primary); }
.fb-rank-count { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.fb-my-rank { margin-top: 14px; padding: 12px; border-radius: var(--r-md); background: var(--bg-subtle); font-size: var(--fs-sm); color: var(--text-secondary); border: 1px solid var(--border-subtle); }

/* 版本更新 */
.fb-version-item { margin-bottom: 18px; }
.fb-version-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.fb-version-title { font-size: var(--fs-base); font-weight: 700; color: var(--text-primary); }
.fb-version-links { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.fb-version-link { font-size: var(--fs-xs); color: var(--primary-text); background: var(--primary-soft); border: 1px solid var(--primary-soft-border); border-radius: var(--r-sm); padding: 4px 8px; cursor: pointer; }

/* 提交/编辑弹层：桌面居中，手机全屏大面板 */
.fb-modal .modal { width: 640px; }
.fb-modal .fb-form { margin-top: 4px; }
.fb-modal input[type="file"] { font-size: var(--fs-sm); }

/* 后台「处理反馈」弹窗：描述、截图、回复、处理表单与历史一屏放不下，默认 520px 过窄 */
.modal.admin-modal--wide { width: 900px; }
@media (max-width: 760px) {
  .modal.admin-modal--wide { width: 100%; max-width: 100%; }
}

@media (max-width: 760px) {
  .fb-modal { align-items: stretch; }
  .fb-modal .modal {
    width: 100%; max-width: 100vw; height: 100%; max-height: 100vh; border-radius: 0; padding: 18px 16px 24px;
  }
}

/* ===== 全局悬浮「提交反馈」入口：页面最左侧中央竖排标签，任何页面常驻 ===== */
.fb-fab {
  position: fixed; left: 0; top: 50%; transform: translateY(-50%);
  z-index: 990; writing-mode: vertical-rl;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 8px;
  border: 1px solid var(--border-strong); border-left: none;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--bg-surface); color: var(--primary-text);
  font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 600;
  letter-spacing: 0.16em; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.fb-fab:hover {
  background: var(--primary-soft);
  border-color: var(--primary-soft-border);
  color: var(--primary-hover);
  box-shadow: var(--shadow-md);
}
.fb-fab:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

/* ===== 悬浮提交面板：无遮罩浮层，靠左垂直居中；点击面板外收起 ===== */
.fb-float { position: fixed; inset: 0; z-index: 1100; pointer-events: none; }
.fb-float[hidden] { display: none; }
.fb-float-panel {
  pointer-events: auto;
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: min(680px, 100vw); max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-default); border-left: none;
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  padding: 20px 24px;
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  animation: fb-slide-in var(--dur-base) var(--ease);
}
@keyframes fb-slide-in { from { transform: translate(-100%, -50%); } to { transform: translate(0, -50%); } }
@media (prefers-reduced-motion: reduce) { .fb-float-panel { animation: none; } }
.fb-float-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 12px; margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.fb-float-head h2 { font-size: var(--fs-md); font-weight: 600; color: var(--text-primary); margin: 0; padding: 0; }
.fb-float-close {
  border: none; background: transparent; font-size: 20px; line-height: 1; color: var(--text-muted);
  cursor: pointer; padding: 4px 8px; border-radius: var(--r-sm);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.fb-float-close:hover { background: var(--bg-muted); color: var(--text-primary); }
.fb-float-close:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* 横排 label 布局（种类/标题/地址/描述/图片/可见范围） */
.fb-field--row { flex-direction: row; align-items: flex-start; gap: 12px; }
.fb-field--row .fb-label {
  width: 68px; flex: none; padding-top: 9px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-primary);
}
.fb-field--row .fb-label i { color: var(--danger); font-style: normal; margin-left: 2px; }
.fb-field--row input[type="text"], .fb-field--row textarea { flex: 1; min-width: 0; }
.fb-field--row textarea { min-height: 96px; }
.fb-image-row { flex-wrap: wrap; }
.fb-image-row .fb-thumbs { flex: 0 0 calc(100% - 80px); margin-left: 80px; }

/* 种类三按钮（错误/改进/需求）：对齐全站分段控件样式 */
.fb-type-group {
  display: inline-flex; gap: 2px; padding: 3px;
  border: 1px solid var(--border-default); border-radius: var(--r-md); background: var(--bg-muted);
}
.fb-type-btn {
  padding: 6px 16px; border: none; border-radius: var(--r-sm);
  background: transparent; color: var(--text-secondary);
  font-size: var(--fs-sm); font-weight: 500; cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.fb-type-btn:hover { color: var(--text-primary); }
.fb-type-btn.active {
  background: var(--bg-surface); font-weight: 600; color: var(--primary-text);
  box-shadow: var(--shadow-xs);
}
.fb-type-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* 图片：直接上传 / 聚焦粘贴 */
.fb-img-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fb-img-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 14px; min-height: 36px;
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--bg-surface); color: var(--text-primary);
  font-size: var(--fs-sm); font-weight: 500; cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.fb-img-btn:hover { border-color: var(--primary); color: var(--primary-text); background: var(--primary-soft); }
.fb-img-btn:focus-visible, .fb-img-btn.is-armed {
  outline: none; border-color: var(--primary); color: var(--primary-text);
  box-shadow: var(--focus-ring);
}
/* 文件域视觉隐藏但仍可被 label 触发；不用 hidden，避免部分内嵌浏览器拒绝唤起选择器 */
.fb-file-input {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.fb-img-limit { color: var(--text-muted); font-size: var(--fs-xs); }

@media (max-width: 760px) {
  .fb-fab { padding: 12px 6px; font-size: var(--fs-xs); }
  .fb-float-panel {
    left: 0; top: 0; transform: none;
    border: none;
    animation-name: fb-slide-in-mobile;
    width: 100vw; height: 100vh; height: 100dvh; max-height: none;
    border-radius: 0; padding: 16px 14px calc(20px + env(safe-area-inset-bottom, 0px));
  }
  .fb-field--row { flex-direction: column; gap: 6px; }
  .fb-image-row .fb-thumbs { flex-basis: auto; width: 100%; margin-left: 0; }
  .fb-field--row .fb-label { width: auto; padding-top: 0; }
  .fb-type-group { display: flex; width: 100%; }
  .fb-type-btn { flex: 1; min-height: 44px; padding: 10px 8px; }
  .fb-img-btn { flex: 1 1 100%; min-height: 44px; font-size: var(--fs-base); }
  .fb-radio-row { padding-top: 2px; min-height: 44px; align-items: center; }
}
@keyframes fb-slide-in-mobile { from { transform: translateX(-100%); } to { transform: translateX(0); } }

@media (max-width: 760px) {
  .fb-toolbar { flex-direction: column; align-items: stretch; }
  .fb-toolbar input[type="text"], .fb-toolbar input[type="date"], .fb-toolbar select { font-size: 16px; min-height: 44px; width: 100%; max-width: none; }
  .fb-field input[type="text"], .fb-field textarea, .fb-field select { font-size: 16px; }
  .fb-chip { min-height: 38px; }
  .fb-card { padding: 12px; }
  .fb-detail-shots img { max-width: 100%; max-height: 200px; }
  .fb-form-actions { flex-direction: column-reverse; }
  .fb-form-actions .btn { width: 100%; min-height: 44px; }
}
