/* ===============================================================
   需求提交平台组件（复用 style.css 设计令牌，黑白灰玻璃拟态）
   =============================================================== */

.rq-wrap { display: grid; gap: 22px; padding-block: 8px 64px; max-width: 860px; }

/* ---- 表单 ---- */
.rq-form { padding: clamp(18px, 3vw, 30px); display: grid; gap: 16px; }
.rq-form--query { max-width: 640px; }
.rq-row { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .rq-form:not(.rq-form--query) .rq-row { grid-template-columns: 1fr 1fr; } .rq-form--query .rq-row { grid-template-columns: 1.2fr 1fr; } }

.rq-field { display: grid; gap: 7px; }
.rq-field label { font-size: 13px; color: var(--muted); letter-spacing: .01em; }
.rq-field .req { color: var(--text); }
.rq-field .rq-hint { color: var(--faint); font-size: 12px; }
.rq-field input[type="text"], .rq-field input[type="email"], .rq-field input[type="password"], .rq-field textarea, .rq-select {
  width: 100%;
  background: var(--glass-grad), var(--surface);
  background-color: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  padding: 10px 13px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.rq-field textarea { resize: vertical; min-height: 120px; line-height: 1.65; }
.rq-field input:focus, .rq-field textarea:focus, .rq-select:focus {
  border-color: rgba(255,255,255,.35);
  box-shadow: 0 0 0 3px rgba(255,255,255,.06);
  background-color: rgba(255,255,255,.05);
}
.rq-field ::placeholder { color: var(--faint); }
.rq-select { appearance: none; cursor: pointer; }
.rq-code-input { font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }

.rq-form-foot { display: grid; gap: 10px; justify-items: start; }
.rq-form-note { color: var(--faint); font-size: 12.5px; line-height: 1.7; }
.rq-form-note a, .rq-muted a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.rq-hp { position: absolute; left: -9999px; top: -9999px; }
.rq-submit { min-width: 140px; }

/* ---- 提示 ---- */
.rq-alert { border: 1px solid var(--border-strong); border-radius: var(--radius); background: rgba(255,255,255,.06); padding: 12px 16px; font-size: 14px; color: var(--text-soft); }
.rq-alert p { margin: 2px 0; }

/* ---- 提交成功结果卡 ---- */
.rq-result { padding: clamp(20px, 3.5vw, 34px); display: grid; gap: 14px; justify-items: start; }
.rq-result-title { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; }
.rq-result-note { color: var(--muted); font-size: 14px; }
.rq-result-grid { display: grid; gap: 12px; grid-template-columns: 1fr; width: 100%; }
@media (min-width: 640px) { .rq-result-grid { grid-template-columns: 1fr 1fr; } }
.rq-result-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 14px 16px; }
.rq-result-item dt { color: var(--faint); font-size: 12px; margin-bottom: 8px; }
.rq-result-item dd { margin: 0; }
.rq-code { font-family: var(--mono); font-size: clamp(18px, 2.6vw, 24px); letter-spacing: .08em; user-select: all; }
.rq-code--sm { font-size: 13px; letter-spacing: .05em; background: rgba(255,255,255,.07); border-radius: 6px; padding: 2px 7px; }
.rq-result-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.rq-result-tip { color: var(--faint); font-size: 12.5px; }

/* ---- 状态徽章（黑白灰四态） ---- */
.rq-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: .02em;
  white-space: nowrap;
}
.rq-badge::before { content: "○"; font-size: 12px; }
.rq-badge--pending { background: rgba(255,255,255,.08); border: 1px dashed var(--border-strong); color: var(--muted); }
.rq-badge--in_progress { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.42); color: var(--text); }
.rq-badge--in_progress::before { content: "◐"; animation: rqPulse 2s ease-in-out infinite; }
.rq-badge--done { background: rgba(255,255,255,.94); border: 1px solid #fff; color: #0a0a0f; }
.rq-badge--done::before { content: "✓"; }
.rq-badge--declined { background: transparent; border: 1px solid var(--border); color: var(--faint); }
.rq-badge--declined::before { content: "∅"; }
@keyframes rqPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .rq-badge--in_progress::before { animation: none; } }

/* ---- 票据页 ---- */
.rq-ticket-title { font-size: clamp(24px, 3.4vw, 36px); }
.rq-sec-title { font-size: 15px; color: var(--muted); letter-spacing: .04em; margin-bottom: 10px; font-weight: 600; }
.rq-detail, .rq-decline { padding: clamp(16px, 2.5vw, 24px); }
.rq-decline { border-style: dashed; color: var(--muted); }
.rq-decline .rq-muted { margin-top: 8px; font-size: 13px; color: var(--faint); }
.rq-body { font-size: 15px; line-height: 1.8; color: var(--text-soft); overflow-wrap: anywhere; white-space: pre-wrap; }
.rq-muted { color: var(--faint); font-size: 13.5px; }

/* ---- 下载卡 ---- */
.rq-download { padding: clamp(16px, 2.5vw, 24px); display: grid; gap: 10px; }
.rq-download-item {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); padding: 12px 16px;
}
.rq-file-name { font-weight: 600; overflow-wrap: anywhere; }
.rq-file-size { color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.rq-btn-sm { padding: 7px 16px; font-size: 13px; margin-left: auto; }
.rq-download--empty { border-style: dashed; }

/* ---- 留言板 ---- */
.rq-board { display: grid; gap: 12px; }
.rq-msg { max-width: 78%; border-radius: var(--radius-lg); padding: 12px 16px; }
.rq-msg--user { justify-self: end; background: var(--glass-grad), var(--surface-2); background-color: rgba(255,255,255,.075); border: 1px solid var(--border); box-shadow: var(--shadow-sm); border-bottom-right-radius: 6px; }
.rq-msg--dev { justify-self: start; background: rgba(255,255,255,.03); border: 1px solid var(--hairline); border-bottom-left-radius: 6px; }
.rq-msg-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.rq-msg-author { font-size: 12.5px; font-weight: 700; color: var(--text-soft); }
.rq-msg--dev .rq-msg-author::after { content: "AI"; font-size: 10px; letter-spacing: .08em; border: 1px solid var(--border-strong); border-radius: 4px; padding: 1px 4px; margin-left: 6px; color: var(--muted); }
.rq-msg-time { color: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.rq-msg-body { font-size: 14.5px; line-height: 1.7; color: var(--text-soft); overflow-wrap: anywhere; }
[dir="rtl"] .rq-msg--user { justify-self: start; border-bottom-right-radius: var(--radius-lg); border-bottom-left-radius: 6px; }
[dir="rtl"] .rq-msg--dev { justify-self: end; border-bottom-left-radius: var(--radius-lg); border-bottom-right-radius: 6px; }

.rq-msg-form { display: grid; gap: 10px; padding: 14px 16px; }
.rq-msg-form textarea { width: 100%; background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font: inherit; font-size: 14px; padding: 10px 12px; outline: none; resize: vertical; }
.rq-msg-form textarea:focus { border-color: rgba(255,255,255,.35); box-shadow: 0 0 0 3px rgba(255,255,255,.06); }
.rq-msg-form button { justify-self: end; }

/* ---- 商业模式页 ---- */
.rq-biz { padding: clamp(20px, 3.5vw, 36px); }
.rq-biz h2 { font-size: clamp(17px, 2.2vw, 21px); margin: 26px 0 10px; letter-spacing: -.01em; }
.rq-biz h2:first-child { margin-top: 0; }
.rq-biz p, .rq-biz li { font-size: 15px; line-height: 1.85; color: var(--text-soft); }
.rq-biz ul { margin: 8px 0 8px 22px; display: grid; gap: 6px; }
.rq-biz .btn { margin-top: 14px; }
.rq-reward { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; margin-top: 12px; }
.rq-reward-card { margin: 0; display: grid; gap: 8px; justify-items: center; }
.rq-reward-card img { width: 180px; height: 180px; border-radius: var(--radius); border: 1px solid var(--border); background: rgba(255,255,255,.04); }
.rq-reward-card figcaption { font-size: 13px; color: var(--muted); }
.rq-reward-note { width: 100%; }

/* ---- 首页需求进度模块 ---- */
.rq-home-list { padding: 2px 0; }
.rq-home-rows { list-style: none; margin: 0; padding: 0; }
.rq-home-row {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 14px 22px; border-bottom: 1px solid var(--hairline);
  transition: background-color .18s ease;
}
.rq-home-row:hover { background: rgba(255,255,255,.045); }
.rq-home-row:last-child { border-bottom: 0; }
.rq-home-title {
  color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500;
  flex: 1 1 auto; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rq-home-row:hover .rq-home-title { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
.rq-home-meta { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.rq-home-date { color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .rq-home-row { flex-direction: column; align-items: flex-start; gap: 7px; padding: 13px 16px; }
  .rq-home-meta { gap: 10px; }
}
.rq-home-empty { padding: 16px; }
.rq-home-empty a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---- 公开进度列表页 ---- */
.rq-public { max-width: 860px; }
.rq-filter-cta { margin-left: auto; }
.rq-table-card { padding: 4px 20px 8px; }
.rq-table-card .rq-table th:first-child, .rq-table-card .rq-table td:first-child { padding-left: 0; }
.rq-table-card .rq-table th:last-child, .rq-table-card .rq-table td:last-child { padding-right: 0; }
.rq-table-card .rq-table tbody tr:last-child td { border-bottom: 0; }
.rq-table-empty { padding: 18px 2px; }
.rq-row-link { color: var(--text); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .18s ease; }
.rq-row-link:hover { border-bottom-color: var(--border-strong); }

/* ---- 管理后台 ---- */
.rq-admin { max-width: 1080px; }
.rq-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rq-table thead th { text-align: left; color: var(--faint); font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; padding: 10px 12px; border-bottom: 1px solid var(--border-strong); }
.rq-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.rq-table tbody tr:hover { background: rgba(255,255,255,.04); }
.rq-table .rq-code--sm { white-space: nowrap; }
.rq-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.rq-filter .chip { cursor: pointer; }
.rq-filter .chip.is-active { background: rgba(255,255,255,.9); color: #0a0a0f; border-color: #fff; }
.rq-pager { display: flex; gap: 8px; align-items: center; color: var(--faint); font-size: 13px; }
.rq-admin-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rq-inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.rq-file-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--hairline); }
.rq-file-row form { margin-left: auto; }
