/* report.css - 专属报告页（产品矩阵 2026-09-02）
 * 色板沿用 styles.css :root token（宣纸底/墨色/青绿/朱砂），不引入新色值。 */

.report-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 72px;
}

/* ---- 产品矩阵 ---- */
.report-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 26px 0 46px;
}
/* 2026-09-07 UI 审计：中等宽度下第三张卡右侧被截断 → 允许卡片收缩换行 */
.report-product {
  min-width: 0;
}

.report-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.report-card:hover {
  border-color: var(--line-strong-hover);
  box-shadow: 0 6px 22px rgba(24, 35, 42, 0.07);
}

.report-card .kicker {
  margin: 0;
}

.report-card h3 {
  margin: 0;
  font-size: 19px;
  color: var(--ink);
}

.report-card-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
  flex: 1;
}

.report-card-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 2px 0;
}

.report-card-price .amount {
  font-size: 26px;
  font-weight: 700;
  color: var(--cinnabar);
}

.report-card-price .eta {
  font-size: 12px;
  color: var(--muted);
}

/* 2026-09-07 终版审计：学业卡推荐态（热门） */
.report-card {
  position: relative;
}
.report-card.is-hot {
  border-color: rgba(169, 58, 46, 0.55);
  box-shadow: 0 10px 26px rgba(169, 58, 46, 0.14);
}
.report-hot-tag {
  position: absolute;
  top: -10px;
  right: 14px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--cinnabar, #a93a2e);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.12em;
}
.report-buy {
  margin-top: 4px;
  padding: 10px 0;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: var(--text-on-accent);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.report-buy:hover {
  background: var(--accent-strong);
}

/* ---- 我的报告列表 ---- */
.report-mine-head {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.report-mine-sub {
  margin: 4px 0 14px;
  font-size: 13px;
  color: var(--muted);
}

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

.report-empty {
  color: var(--muted);
  font-size: 13.5px;
  background: var(--surface-soft);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  text-align: center;
}

.report-item {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}

.report-item-name {
  font-weight: 600;
  color: var(--ink);
  font-size: 14.5px;
}

.report-item-meta {
  font-size: 12.5px;
  color: var(--muted);
}

.report-item-status {
  margin-left: auto;
  font-size: 12.5px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface-soft);
}

.report-item-status.pending { color: #8a6d1a; border-color: rgba(170, 130, 30, 0.35); background: rgba(212, 175, 55, 0.10); }
.report-item-status.generating { color: var(--accent-strong); border-color: var(--accent-medium); background: var(--accent-soft); }
.report-item-status.ready { color: var(--accent-strong); border-color: var(--accent-medium); background: var(--accent-soft); }
.report-item-status.failed { color: var(--cinnabar); border-color: rgba(169, 58, 46, 0.30); background: var(--cinnabar-soft); }
.report-item-status.cancelled { color: var(--text-disabled); }

.report-item-view {
  padding: 6px 14px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: transparent;
  color: var(--accent-strong);
  font-size: 13px;
  cursor: pointer;
}

.report-item-view:hover { background: var(--accent-soft); }

/* ---- 弹层通用 ---- */
.report-dialog {
  border: none;
  border-radius: 12px;
  padding: 0;
  max-width: 640px;
  width: min(92vw, 640px);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 18px 60px rgba(24, 35, 42, 0.22);
}

.report-dialog::backdrop {
  background: rgba(24, 35, 42, 0.45);
}

.report-dialog-body {
  padding: 26px 26px 24px;
  max-height: 82vh;
  overflow-y: auto;
}

.report-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.report-dialog-head h2 {
  margin: 2px 0 0;
  font-size: 20px;
}

.report-close {
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 6px;
}

.report-close:hover { color: var(--ink); }

/* ---- 问卷表单 ---- */
.report-form-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 14px;
}

.report-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

.report-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.report-field.full { grid-column: 1 / -1; }

.report-field label {
  font-size: 12.5px;
  color: var(--muted);
}

.report-field input,
.report-field select,
.report-field textarea {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  padding: 9px 10px;
  font-size: 14px;
  color: var(--ink);
  font-family: inherit;
}

.report-field textarea { resize: vertical; }

.report-field input:focus,
.report-field select:focus,
.report-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}

.report-error {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--cinnabar);
  background: var(--cinnabar-soft);
  border-radius: 7px;
  padding: 9px 12px;
}

.report-form-actions {
  margin-top: 16px;
}

.report-submit {
  width: 100%;
  padding: 12px 0;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: var(--text-on-accent);
  font-size: 15px;
  cursor: pointer;
}

.report-submit:hover { background: var(--accent-strong); }
.report-submit:disabled { opacity: 0.55; cursor: wait; }

.report-price { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.report-price-strong { color: var(--cinnabar); font-size: 20px; }

/* ---- 收款 ---- */
.report-pay-info {
  font-size: 14px;
  line-height: 1.9;
  margin-bottom: 6px;
}

.report-pay-tip { color: var(--muted); font-size: 13px; }

.report-pay-qrs {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin: 16px 0 10px;
}

.report-pay-qr {
  text-align: center;
  margin: 0;
}

.report-pay-qr img {
  width: 168px;
  height: 168px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.report-pay-qr figcaption {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

.report-pay-note {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}

/* ---- 报告查看 ---- */
.report-view-dialog { max-width: 760px; width: min(94vw, 760px); }

.report-view-meta { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }

.report-view-actions { display: flex; gap: 8px; align-items: center; }

.report-print {
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent-strong);
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}

.report-print:hover { background: var(--accent-soft); }

.report-view-body {
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding-top: 16px;
  white-space: pre-wrap;
  word-break: break-word;
}

.report-view-body .rp-h {
  display: block;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--accent-strong);
  margin: 20px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.report-view-body .rp-h:first-child { margin-top: 4px; }

/* ---- 移动端 ---- */
@media (max-width: 640px) {
  .report-form { grid-template-columns: 1fr; }
  .report-pay-qrs { flex-direction: column; align-items: center; }
  .report-item-status { margin-left: 0; }
}

/* ---- 打印（只打报告正文）---- */
@media print {
  body * { visibility: hidden; }
  #report-view-dialog,
  #report-view-dialog * { visibility: visible; }
  #report-view-dialog {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: none;
    box-shadow: none;
  }
  #report-view-dialog .report-dialog-body { max-height: none; overflow: visible; }
  .report-view-actions { display: none; }
}

/* ---- 移动端补强（2026-09-05 夜间任务：报告页是手机端体验最差的页面） ---- */
@media (max-width: 640px) {
  /* 页头：主标题与眉题收紧，留出内容空间 */
  .report-main { padding: 14px 12px 40px; }
  .tool-head { padding-top: 14px; }

  /* 产品卡：单列流式，价格行不再挤压 */
  .report-products { grid-template-columns: 1fr; gap: 20px; }
  .report-product { padding: 14px; }

  /* 问卷表单：两列字段全部落单列，输入字号 ≥16px 防 iOS 聚焦缩放 */
  .report-form { grid-template-columns: 1fr; gap: 10px; }
  .report-form input,
  .report-form textarea,
  .report-form select { font-size: 16px; }

  /* 弹层：报告阅读器全屏化，操作按钮吸底易触达 */
  .report-dialog-body { max-height: calc(100dvh - 150px); }
  .report-view-actions { flex-wrap: wrap; gap: 8px; }
  .report-view-actions .btn { flex: 1 1 40%; min-height: 44px; }

  /* 触控目标：所有可点行/按钮最小 44px */
  .report-item { min-height: 44px; }
}
