/* ============================================================
   新力电业 · 反馈收集站   全站视觉
   配色：深海军蓝（稳重 / 电力）+ 电光黄（能量 / 强调）+ 青蓝（科技）
   ============================================================ */
:root {
  --navy-900: #071f36;
  --navy-800: #0b2f50;
  --navy-700: #12456f;
  --blue-600: #1769ad;
  --blue-500: #2189d4;
  --cyan-400: #4fc6e8;
  --amber: #ffb423;
  --amber-dark: #ef8f00;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --ink: #122c46;
  --muted: #647c96;
  --line: #dfe8f2;
  --ok: #16865c;
  --err: #cf3b3b;
  --shadow: 0 20px 50px rgba(9, 43, 76, .10);
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
/* 细网格底纹，暗示电网 / 电路 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(23, 105, 173, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 105, 173, .045) 1px, transparent 1px);
  background-size: 38px 38px;
}
.wrap { width: min(760px, calc(100% - 32px)); margin: 0 auto; }
a { color: inherit; }

/* ---------- 顶部品牌栏 ---------- */
.site-header {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: #fff; /* 公司 logo 红白 VI：白色底板衬托红色标识 */
  box-shadow: 0 6px 16px rgba(11, 47, 80, .18);
  overflow: hidden;
}
.brand-mark img { width: 26px; height: 26px; object-fit: contain; }
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 18px; letter-spacing: .5px; color: var(--navy-900); }
.brand-text small { font-size: 9px; letter-spacing: 2px; color: var(--muted); }
.badge-internal {
  font-size: 12px;
  color: var(--blue-600);
  background: #eaf4fd;
  border: 1px solid #cfe4f7;
  padding: 4px 11px;
  border-radius: 999px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  margin-top: 16px;
  padding: 24px 34px 50px;
  border-radius: var(--radius);
  color: #fff;
  background:
    radial-gradient(circle at 88% 12%, rgba(79, 198, 232, .35), transparent 42%),
    linear-gradient(125deg, var(--navy-900) 0%, var(--navy-700) 58%, var(--blue-600) 100%);
  box-shadow: 0 18px 40px rgba(7, 31, 54, .24);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(90deg, transparent, #000);
  pointer-events: none;
}
.hero-bolt {
  position: absolute;
  right: 26px;
  top: 12px;
  width: 180px;
  height: 180px;
  color: var(--amber);
  opacity: .13;
  transform: rotate(12deg);
  pointer-events: none;
}
.hero-bolt svg { width: 100%; height: 100%; }
.hero > *:not(.hero-bolt) { position: relative; z-index: 1; }
.eyebrow {
  margin: 0 0 7px;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--cyan-400);
  font-weight: 600;
}
.hero h1 {
  margin: 0 0 9px;
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: 1px;
  font-weight: 700;
}
.hero h1 .accent { color: var(--amber); }
.hero-sub { margin: 0; font-size: 13px; color: rgba(255, 255, 255, .82); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.hero-chips span {
  display: inline-flex; align-items: center;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  color: rgba(255, 255, 255, .82);
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .16);
}

/* ---------- 表单卡片（叠在 Hero 上） ---------- */
.form-card {
  position: relative;
  margin: -32px 0 32px;
  padding: 26px 34px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.field { margin-bottom: 19px; }
.field > label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-800);
}
.req { color: var(--amber-dark); margin-left: 2px; }
.opt { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 4px; }
.hint { margin: 7px 0 0; font-size: 12px; color: var(--muted); }
.hint.anon-on { color: var(--amber-dark); }

.input-row { display: flex; align-items: center; gap: 14px; }
input[type="text"], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
input[type="text"]::placeholder, textarea::placeholder { color: #a0b2c6; }
input[type="text"]:focus, select:focus, textarea:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(33, 137, 212, .13);
}
input:disabled { background: #f1f4f8; color: #9aabbb; cursor: not-allowed; }
textarea { resize: vertical; min-height: 132px; line-height: 1.7; }

.anon-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--navy-700);
  cursor: pointer;
  user-select: none;
}
.anon-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.anon-toggle .box {
  width: 17px; height: 17px;
  border: 1.5px solid #b9cbdc;
  border-radius: 5px;
  display: grid; place-items: center;
  background: #fff;
  transition: all .18s;
}
.anon-toggle input:checked + .box {
  background: var(--blue-600);
  border-color: var(--blue-600);
}
.anon-toggle input:checked + .box::after {
  content: "";
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}
.anon-toggle input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(33, 137, 212, .2); }

/* 统一所有下拉框箭头：内联 SVG chevron，右侧留 16px 间距 */
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5 L6 8.5 L10 4.5' fill='none' stroke='%23647c96' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 12px;
  padding-right: 38px;
  cursor: pointer;
}
.select-wrap { position: relative; }
/* 旧的 border 画箭头已由上面的 SVG 箭头取代 */
.select-wrap .arrow { display: none; }

.counter { text-align: right; font-size: 12px; color: var(--muted); margin-top: 5px; }

.msg {
  display: none;
  margin: 0 0 16px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
}
.msg.show { display: block; }
.msg.ok { color: #0e6b49; background: #e7f7ef; border: 1px solid #bfe9d4; }
.msg.err { color: #a32c2c; background: #fdecec; border: 1px solid #f5cccc; }

/* 字段行内错误提示：显示在对应输入框/下拉框下方 */
.field-error {
  display: none;
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #b83232;
}
.field-error.show { display: flex; align-items: center; gap: 5px; }
.field-error::before {
  content: "!";
  flex: none;
  width: 15px; height: 15px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
  background: #d64545; border-radius: 50%;
}
/* 校验失败时输入框/下拉框/文本域标红 */
.field.has-error input[type="text"],
.field.has-error select,
.field.has-error textarea {
  border-color: #d64545;
  background: #fff8f8;
}
.field.has-error input[type="text"]:focus,
.field.has-error select:focus,
.field.has-error textarea:focus {
  border-color: #d64545;
  box-shadow: 0 0 0 3px rgba(214, 69, 69, .13);
}

.btn-primary {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: inherit; font-size: 15px; font-weight: 600; letter-spacing: .5px;
  color: #fff;
  border: 0;
  border-radius: 11px;
  padding: 13px 20px;
  cursor: pointer;
  background: linear-gradient(100deg, var(--blue-600), var(--blue-500) 65%, var(--cyan-400));
  box-shadow: 0 10px 22px rgba(23, 105, 173, .26);
  transition: transform .18s, box-shadow .18s, opacity .18s;
}
.btn-primary svg { width: 17px; height: 17px; color: var(--amber); }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 26px rgba(23, 105, 173, .32); }
.btn-primary:disabled { opacity: .65; cursor: not-allowed; }

.form-foot { margin: 14px 0 0; text-align: center; font-size: 12px; color: var(--muted); }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 30px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  .wrap { width: calc(100% - 24px); }
  .header-inner { height: 52px; }
  .hero { margin-top: 12px; padding: 20px 20px 44px; border-radius: 14px; }
  .hero h1 { font-size: 23px; }
  .hero-sub { font-size: 12px; }
  .hero-bolt { width: 110px; height: 110px; right: 6px; top: 6px; }
  .form-card { margin: -26px 12px 24px; padding: 22px 20px 20px; border-radius: 14px; }
  .field { margin-bottom: 18px; }
  .input-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .anon-toggle { margin-left: 2px; }
  .brand-text strong { font-size: 16px; }
}

/* ---------- 顶部右侧操作区 ---------- */
.header-actions { display: flex; align-items: center; gap: 10px; }
.btn-view {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 12px; font-weight: 600;
  color: var(--blue-600);
  background: #eaf4fd; border: 1px solid #cfe4f7;
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
  transition: background .16s, border-color .16s;
}
.btn-view:hover { background: #dcecfb; border-color: var(--blue-500); }
.btn-view svg { width: 13px; height: 13px; }

/* ---------- 弹框 ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(7, 31, 54, .55);
  backdrop-filter: blur(4px);
}
.modal-backdrop[hidden] { display: none; }
.modal {
  position: relative;
  width: min(400px, 100%);
  background: var(--surface);
  border-radius: 18px;
  padding: 32px 30px 28px;
  box-shadow: 0 24px 60px rgba(7, 31, 54, .3);
  text-align: center;
  animation: modal-pop .2s ease-out;
}
@keyframes modal-pop {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.modal-icon {
  width: 60px; height: 60px; margin: 0 auto 16px;
  border-radius: 50%; display: grid; place-items: center;
}
.modal-icon svg { width: 30px; height: 30px; }
.success-icon { background: #e6f7ef; color: var(--ok); }
.lock-icon { background: #eaf4fd; color: var(--blue-600); }
.modal h3 { margin: 0 0 8px; font-size: 20px; color: var(--navy-900); }
.modal p { margin: 0 0 20px; font-size: 13px; color: var(--muted); }
.modal input[type="password"] { text-align: center; letter-spacing: 1px; font-size: 15px; }
.modal .msg { margin-bottom: 14px; }
.modal-ok { width: 100%; }
.modal-close {
  position: absolute; top: 12px; right: 14px;
  width: 30px; height: 30px;
  border: 0; background: none; cursor: pointer;
  font-size: 24px; line-height: 1; color: var(--muted);
  border-radius: 8px;
}
.modal-close:hover { background: #f1f5f9; color: var(--ink); }

/* 宽弹框：需求列表 */
.modal-backdrop-wide { padding: 24px; }
.modal-wide {
  width: min(720px, 100%);
  text-align: left;
  padding: 24px 26px 20px;
  max-height: 88vh;
  max-height: 88dvh; /* 移动端地址栏伸缩时更稳，不支持 dvh 的浏览器回退到 vh */
  display: flex; flex-direction: column;
  overflow: hidden;
}
.list-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-right: 34px; }
.list-head h3 { margin: 0; font-size: 18px; }
.list-total { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.btn-refresh {
  font: inherit; font-size: 12px; color: var(--blue-600);
  display: inline-flex; align-items: center; gap: 5px;
  background: #eaf4fd; border: 1px solid #cfe4f7;
  padding: 5px 12px; border-radius: 8px; cursor: pointer;
}
.btn-refresh svg { width: 13px; height: 13px; }
.btn-refresh:hover { background: #dcecfb; }
/* flex-basis 用 auto：内容少时按内容高度正常显示；内容多时配合 min-height:0 在封顶高度内收缩滚动 */
/* 若用 flex:1 1 0 会因父容器无固定高度而塌成 0，导致内容不显示 */
.list-scroll { overflow-y: auto; flex: 1 1 auto; min-height: 0; padding-right: 4px; }
.list-empty { text-align: center; color: var(--muted); padding: 48px 0; font-size: 14px; }
.fb-item { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; background: #fbfdff; }
.fb-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.fb-badge { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.fb-badge.feature { background: #e7f2fd; color: #1769ad; }
.fb-badge.pain { background: #fdf0e6; color: #c96a12; }
.fb-badge.efficiency { background: #e6f7f2; color: #128665; }
.fb-name { color: var(--navy-700); font-weight: 600; }
.fb-status { font-size: 11px; padding: 2px 8px; border-radius: 6px; background: #f1f5f9; color: var(--muted); }
.fb-time { margin-left: auto; font-variant-numeric: tabular-nums; }
/* 单行显示，超出以省略号收尾，避免长内容把条目无限撑高 */
.fb-content {
  font-size: 14px; line-height: 1.75; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.list-foot { flex: none; margin: 14px 0 0; text-align: center; font-size: 12px; }
.list-foot a { color: var(--blue-600); text-decoration: none; }
.list-foot a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .badge-internal { display: none; }
  .modal { padding: 28px 22px 24px; }
  .modal-wide { padding: 20px 16px 16px; }
  .list-head { flex-wrap: wrap; }
  .fb-time { margin-left: 0; width: 100%; }
}
