/* ============================================================
   帮助中心 / 工单系统样式
   ============================================================ */

.hc-wrap { padding-bottom: 40px; }
.hc-crumb { padding: 16px 0; font-size: 13px; color: var(--text-3); }
.hc-crumb a { color: var(--text-2); }
.hc-crumb a:hover { color: var(--primary); }

/* 头部介绍 */
.hc-hero {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px;
  background: linear-gradient(120deg, #1e40af 0%, #2563eb 55%, #7c3aed 100%);
  color: #fff; border-radius: 16px; padding: 36px 38px; margin-bottom: 22px;
  position: relative; overflow: hidden;
}
.hc-hero::before { content: ""; position: absolute; right: -80px; top: -100px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hc-hero::after  { content: ""; position: absolute; left: -50px; bottom: -120px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.06); }
.hc-hero-l { position: relative; z-index: 1; }
.hc-hero h1 { font-size: 28px; margin-bottom: 10px; }
.hc-hero p { font-size: 14px; line-height: 1.9; opacity: .92; }
.hc-points { list-style: none; margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; font-size: 13.5px; opacity: .9; }
.hc-points b { display: inline-block; min-width: 110px; color: #fde68a; }

.hc-hero-r {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: center;
  position: relative; z-index: 1;
}
.hc-stat {
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px; padding: 18px 14px; text-align: center; backdrop-filter: blur(8px);
}
.hc-stat b { display: block; font-size: 22px; font-weight: 700; }
.hc-stat span { font-size: 12.5px; opacity: .82; }

/* 主卡片 */
.hc-card { background: #fff; border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.hc-tabs { display: flex; border-bottom: 1px solid var(--border); padding: 0 24px; }
.hc-tab {
  padding: 16px 24px; font-size: 15px; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: .2s;
}
.hc-tab:hover { color: var(--primary); }
.hc-tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }

.hc-pane { padding: 26px 28px; }

/* 表单 */
.hc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; }
.hc-form .fg-item { display: block; }
.hc-form .fg-item.full { grid-column: 1 / -1; }
.hc-form label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 7px; }
.hc-form .req { color: var(--danger); }
.hc-form input, .hc-form textarea, .hc-form select {
  width: 100%; height: 42px; border: 1px solid var(--border); border-radius: 8px;
  padding: 0 14px; font-size: 14px; color: var(--text); outline: none; transition: .18s; background: #fff;
}
.hc-form textarea { height: auto; padding: 12px 14px; resize: vertical; }
.hc-form input:focus, .hc-form textarea:focus, .hc-form select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }

/* 问题类型网格 */
.hc-type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.hc-type-card {
  border: 1.5px solid var(--border); border-radius: 10px; padding: 14px 10px;
  text-align: center; cursor: pointer; transition: .2s; font-size: 13.5px; color: var(--text-2);
  background: #fff;
}
.hc-type-card i { display: block; font-size: 24px; font-style: normal; margin-bottom: 6px; }
.hc-type-card:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-l); }
.hc-type-card.active { border-color: var(--primary); background: var(--primary-l); color: var(--primary); font-weight: 600; }

.hc-submit { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.hc-submit .btn-primary { padding: 12px 36px; font-size: 15px; }
.hc-hint { font-size: 12.5px; color: var(--text-3); }
.hc-hint a { color: var(--primary); }

/* 我的工单 */
.tk-list { display: flex; flex-direction: column; }
.tk-row {
  border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px;
  background: #fff; transition: .2s; cursor: pointer;
}
.tk-row:hover { border-color: #bfdbfe; box-shadow: 0 6px 16px rgba(15,23,42,.05); }
.tk-head { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.tk-id { font-weight: 700; color: var(--text); font-size: 14px; }
.tk-title { flex: 1; color: var(--text); font-size: 14.5px; }
.tk-meta { display: flex; gap: 14px; font-size: 12px; color: var(--text-3); margin-top: 4px; }
.tk-reply { color: var(--primary); }
.tk-reply-num { font-weight: 600; }

/* 状态/优先级标签 */
.t-tag { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 11.5px; }
.t-tag.s-待处理  { background: #fff7ed; color: #d97706; }
.t-tag.s-处理中  { background: var(--primary-l); color: var(--primary); }
.t-tag.s-待用户回复 { background: #fdf4ff; color: var(--purple); }
.t-tag.s-已解决  { background: var(--success-l); color: var(--success); }
.t-tag.s-已关闭  { background: #f1f5f9; color: var(--text-3); }
.t-tag.p-低  { background: #f1f5f9; color: var(--text-3); }
.t-tag.p-中  { background: var(--primary-l); color: var(--primary); }
.t-tag.p-高  { background: #fff7ed; color: #ea580c; }
.t-tag.p-紧急 { background: var(--danger-l); color: var(--danger); }
.t-tag.t-other  { background: #f1f5f9; color: var(--text-2); }
.t-tag.t-商品咨询  { background: var(--primary-l); color: var(--primary); }
.t-tag.t-物流问题  { background: #fff7ed; color: #ea580c; }
.t-tag.t-退换货   { background: #fdf4ff; color: var(--purple); }
.t-tag.t-售后服务 { background: #ecfeff; color: #0891b2; }
.t-tag.t-发票问题 { background: #fef3c7; color: #d97706; }
.t-tag.t-账号问题 { background: #f1f5f9; color: var(--text-2); }

/* 详情面板 */
.tk-detail { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-top: 12px; }
.tk-detail-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.tk-detail-head h3 { font-size: 17px; }
.tk-detail-back { font-size: 13px; color: var(--primary); cursor: pointer; }

.tk-chat { display: flex; flex-direction: column; gap: 14px; max-height: 460px; overflow-y: auto; padding: 4px; margin-bottom: 14px; }
.tk-bubble { display: flex; gap: 10px; }
.tk-bubble.me { flex-direction: row-reverse; }
.tk-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.tk-bubble.you .tk-avatar { background: var(--primary-l); color: var(--primary); }
.tk-bubble.me .tk-avatar { background: linear-gradient(135deg, #f43f5e, #f97316); color: #fff; }
.tk-bd { background: var(--bg); border-radius: 10px; padding: 10px 14px; max-width: 70%; }
.tk-bubble.me .tk-bd { background: var(--primary-l); color: var(--text); }
.tk-bubble-meta { font-size: 11.5px; color: var(--text-3); margin-bottom: 4px; }
.tk-bubble-text { font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }

.tk-info { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--text-3); margin-bottom: 12px; }
.tk-info b { color: var(--text-2); margin-right: 4px; }
.tk-reply-form { display: flex; gap: 10px; }
.tk-reply-form textarea { flex: 1; height: 60px; resize: none; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; outline: none; font-size: 13.5px; font-family: inherit; }
.tk-reply-form textarea:focus { border-color: var(--primary); }
.tk-reply-form button { padding: 0 22px; height: auto; align-self: stretch; background: var(--primary); color: #fff; border-radius: 8px; font-size: 13.5px; }
.tk-reply-form button:disabled { opacity: .5; cursor: not-allowed; }

.tk-empty, .tk-loading { padding: 40px 0; text-align: center; color: var(--text-3); font-size: 14px; }

/* 成功弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-mask.show { display: flex; }
.hc-success { width: 420px; max-width: 100%; background: #fff; border-radius: 16px; padding: 32px 28px; text-align: center; animation: popIn .25s ease; }
@keyframes popIn { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.hs-icon { font-size: 50px; margin-bottom: 10px; }
.hc-success h2 { font-size: 22px; margin-bottom: 6px; }
.hs-sub { font-size: 13.5px; color: var(--text-3); margin-bottom: 18px; }
.hs-id { background: var(--primary-l); color: var(--primary); font-size: 16px; padding: 12px; border-radius: 8px; margin-bottom: 14px; }
.hs-id b { font-size: 18px; letter-spacing: 1px; }
.hs-tip { font-size: 12.5px; color: var(--text-3); margin-bottom: 22px; line-height: 1.7; }
.hs-foot { display: flex; gap: 12px; justify-content: center; }

@media (max-width: 860px) {
  .hc-hero { grid-template-columns: 1fr; padding: 26px; }
  .hc-points { grid-template-columns: 1fr; }
  .hc-form { grid-template-columns: 1fr; }
  .hc-type-grid { grid-template-columns: repeat(2, 1fr); }
  .tk-bd { max-width: 86%; }
}
