/* ============================================================
   图改大小 · 文档页样式
   ------------------------------------------------------------
   用于：用户协议 / 隐私政策 / 意见反馈 / 历史记录
   依赖 app.css 的 :root 变量与 .nav（用 <link> 先引 app.css）
   ============================================================ */

/* ==================== 页头 ==================== */
.doc-head {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  padding: 42px 0 46px;
}

.doc-head-inner { max-width: 880px; margin: 0 auto; padding: 0 24px; }

.doc-head h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: .5px;
  line-height: 1.3;
}

.doc-head p {
  margin: 10px 0 0;
  font-size: 14px;
  opacity: .88;
  line-height: 1.6;
}

/* ==================== 正文容器 ==================== */
.doc-body {
  max-width: 880px;
  margin: 0 auto;
  padding: 30px 24px 0;
}

.doc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 38px 44px;
}

/* 引言块 */
.doc-intro {
  background: var(--brand-soft);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 14.5px;
  line-height: 1.9;
  color: #3730A3;
  margin-bottom: 30px;
}

/* 章节 */
.doc-sec { margin-bottom: 28px; }
.doc-sec:last-of-type { margin-bottom: 0; }

.doc-h {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--brand);
  line-height: 1.35;
  color: var(--text);
}

.doc-p {
  margin: 0 0 9px;
  font-size: 14.5px;
  line-height: 1.9;
  color: #334155;
}
.doc-p:last-child { margin-bottom: 0; }

/* 需要强调的提示（如"不上传""立即删除"） */
.doc-p b, .doc-strong { color: var(--text); font-weight: 600; }

/* ==================== 表格 ==================== */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0 0;
  font-size: 13.5px;
}

.doc-table th,
.doc-table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
}

.doc-table th {
  background: #F8FAFF;
  font-weight: 600;
  color: #334155;
}

.doc-table td:first-child { white-space: nowrap; }

/* ==================== 日期 / 联系方式 ==================== */
.doc-dates {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px dashed var(--line);
  font-size: 13.5px;
  color: var(--muted);
}

.doc-dates span { display: inline-block; margin-right: 22px; }

.doc-contact {
  margin-top: 16px;
  background: #F8FAFF;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.8;
}

.doc-contact b { color: var(--brand); font-weight: 600; }

/* ==================== 页脚 ==================== */
.doc-foot {
  max-width: 880px;
  margin: 0 auto;
  padding: 26px 24px 56px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}

.doc-links {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.doc-links a { color: var(--muted); transition: color .16s; }
.doc-links a:hover { color: var(--brand); }

.doc-foot .sep { margin: 0 6px; opacity: .5; }

/* ==================== 响应式 ==================== */
@media (max-width: 720px) {
  .doc-head { padding: 28px 0 32px; }
  .doc-head-inner { padding: 0 16px; }
  .doc-head h1 { font-size: 22px; }
  .doc-head p { font-size: 13px; }

  .doc-body { padding: 18px 14px 0; }
  .doc-card { padding: 22px 18px; border-radius: 14px; }

  .doc-intro { font-size: 14px; padding: 14px 15px; }
  .doc-h { font-size: 16px; padding-left: 10px; }
  .doc-p { font-size: 14px; line-height: 1.85; }

  .doc-table { font-size: 12.5px; }
  .doc-table th, .doc-table td { padding: 8px 9px; }
  .doc-table td:first-child { white-space: normal; }

  .doc-dates span { display: block; margin: 0 0 4px; }

  .doc-foot { padding: 22px 16px 46px; }
  .doc-links { gap: 12px; font-size: 12.5px; }
}

/* ============================================================
   历史记录页
   ============================================================ */
.hist-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.hist-tabs { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }

.hist-tab,
.hist-clear {
  font-size: 13.5px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: border-color .16s, color .16s, background .16s, box-shadow .16s;
  white-space: nowrap;
}

.hist-tab:hover { border-color: #C7D2FE; color: var(--brand); }

.hist-tab.is-on {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, .25);
}

.hist-clear:hover { border-color: #FCA5A5; color: #DC2626; background: #FEF2F2; }

.hist-list { display: flex; flex-direction: column; gap: 10px; }

.hist-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  transition: border-color .16s, box-shadow .16s;
}
.hist-item.is-link { cursor: pointer; }
.hist-item.is-link:hover { border-color: #C7D2FE; box-shadow: var(--shadow-hover); }

.hist-thumb {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hist-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hist-thumb.is-ico { font-size: 24px; }

.hist-main { flex: 1; min-width: 0; }

.hist-name {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hist-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.hist-text {
  font-size: 13px;
  color: #475569;
  margin-top: 6px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hist-del {
  flex-shrink: 0;
  font-size: 13px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: border-color .16s, color .16s, background .16s;
}
.hist-del:hover { border-color: #FCA5A5; color: #DC2626; background: #FEF2F2; }

.hist-empty { text-align: center; padding: 70px 20px 84px; }
.hist-empty-ico { font-size: 46px; opacity: .5; line-height: 1; }
.hist-empty-t { font-size: 16px; font-weight: 600; margin: 14px 0 6px; color: var(--text); }
.hist-empty-d { font-size: 13.5px; color: var(--muted); margin: 0 0 22px; }

.hist-empty-btn {
  display: inline-block;
  font-size: 14px;
  padding: 10px 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 6px 16px rgba(99, 102, 241, .28);
}

/* ============================================================
   意见反馈页
   ============================================================ */
.fb-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 30px 34px;
  margin-bottom: 18px;
}

.fb-label { font-size: 14.5px; font-weight: 600; margin-bottom: 10px; display: block; }
.fb-label .opt { font-size: 12.5px; font-weight: 400; color: var(--muted); margin-left: 6px; }

.fb-ta {
  width: 100%;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  font-size: 14.5px;
  line-height: 1.7;
  font-family: inherit;
  color: var(--text);
  resize: vertical;
  background: #FCFDFF;
  transition: border-color .16s, box-shadow .16s;
}
.fb-ta:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99, 102, 241, .12); }

.fb-count { text-align: right; font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.fb-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--text);
  background: #FCFDFF;
  transition: border-color .16s, box-shadow .16s;
}
.fb-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99, 102, 241, .12); }

.fb-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

.fb-btn {
  font-size: 15px;
  padding: 12px 30px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 6px 16px rgba(99, 102, 241, .28);
  transition: transform .16s, box-shadow .16s;
}
.fb-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(99, 102, 241, .34); }

.fb-btn.is-ghost {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}
.fb-btn.is-ghost:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

.fb-mail {
  margin-top: 22px;
  background: #F8FAFF;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.9;
}
.fb-mail b { color: var(--brand); }
.fb-mail code {
  background: #EEF2FF;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 13.5px;
  color: #3730A3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.fb-tip { font-size: 13px; color: var(--muted); line-height: 1.8; margin-top: 14px; }

.fb-toast {
  position: fixed;
  left: 50%;
  bottom: 44px;
  transform: translateX(-50%) translateY(12px);
  background: rgba(30, 41, 59, .94);
  color: #fff;
  font-size: 14px;
  padding: 11px 22px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 999;
}
.fb-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 720px) {
  .hist-bar { gap: 10px; }
  .hist-tab, .hist-clear { font-size: 13px; padding: 6px 13px; }
  .hist-item { padding: 10px 12px; gap: 11px; }
  .hist-thumb { width: 46px; height: 46px; }
  .hist-name { font-size: 14px; }
  .hist-empty { padding: 50px 16px 60px; }

  .fb-card { padding: 20px 18px; border-radius: 14px; }
  .fb-btn { flex: 1; padding: 12px 18px; }
}
