/* ============================================================
   故障排查向导 /troubleshoot —— 依赖 pages.css
   (复用 .card / .plans-tabs / .tab-panel / .usage-field / .attention-box)
   ============================================================ */

.ts-wrap { max-width: 780px; display: flex; flex-direction: column; gap: 22px; }

/* ---------- 订单诊断 ---------- */
.ts-diag { padding: 24px 22px; }
.ts-diag-h { font-size: 17px; margin: 0 0 8px; }
.ts-diag-sub { margin: 0 0 18px; font-size: 14px; color: var(--muted); line-height: 1.7; }
.ts-diag-form { display: flex; flex-direction: column; gap: 16px; }
.ts-diag-form .btn { padding: 13px 22px; font-size: 15px; }
.ts-diag-form .btn:active { transform: scale(.97); }
.ts-diag-form .btn:disabled { opacity: .6; cursor: default; transform: none; }

.ts-result { margin-top: 20px; display: flex; flex-direction: column; gap: 16px; }
.ts-loading { text-align: center; padding: 24px; color: var(--muted); font-size: 14px; }

/* ---------- 诊断结果卡片 ---------- */
.ts-card {
  border: 1px solid var(--border); border-left: 4px solid var(--muted);
  border-radius: var(--radius); padding: 18px 20px; background: var(--surface);
}
.ts-card.ts-ok   { border-left-color: #16A34A; background: #F0FDF4; border-color: #BBF7D0; }
.ts-card.ts-warn { border-left-color: #F4B400; background: #FFF8E1; border-color: #F4D58D; }
.ts-card.ts-bad  { border-left-color: #DC2626; background: #FEF2F2; border-color: #FECACA; }

.ts-card-h { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.ts-verdict strong { display: block; font-size: 16px; line-height: 1.5; margin-bottom: 6px; }
.ts-verdict p { margin: 0; font-size: 14px; line-height: 1.75; color: var(--text); }

/* 判定依据(剩余流量/有效期…) */
.ts-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid rgba(15, 23, 42, .08);
}
.ts-facts div { display: flex; flex-direction: column; gap: 2px; }
.ts-facts dt { font-size: 12px; color: var(--muted); }
.ts-facts dd { margin: 0; font-size: 15px; font-weight: 700; }

.ts-apn { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(15, 23, 42, .08); }
.ts-apn h4, .ts-nets h4 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.ts-apn code {
  display: inline-block; padding: 6px 12px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700; letter-spacing: .3px;
  user-select: all; /* 手机上长按即可整段选中 */
}
.ts-muted { font-size: 14px; color: var(--muted); }

.ts-nets { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(15, 23, 42, .08); }
.ts-nets ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ts-nets li { font-size: 14px; line-height: 1.6; }
.ts-net-c { font-weight: 700; }

/* ---------- 六步排查 ---------- */
.ts-steps-h, .ts-faq-h { font-size: 20px; margin: 8px 0 0; text-align: center; }

.ts-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ts-step { display: flex; gap: 14px; padding: 20px; }
.ts-step .step-num {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 16px; font-weight: 800;
}
.ts-step-body { min-width: 0; }
.ts-step-body h3 { margin: 4px 0 6px; font-size: 16px; }
.ts-why { margin: 0 0 10px; font-size: 14px; color: var(--muted); line-height: 1.75; }
.ts-path {
  margin: 0; padding: 10px 14px; font-size: 14px; line-height: 1.7;
  background: var(--primary-light); border-radius: var(--radius-sm); color: var(--primary-dark);
}
.ts-path b { color: var(--primary-dark); }

/* ---------- 仍未解决 ---------- */
.ts-still { padding: 24px 22px; text-align: center; }
.ts-still h2 { font-size: 17px; margin: 0 0 8px; }
.ts-still p { margin: 0 0 16px; font-size: 14px; color: var(--muted); line-height: 1.75; }

.ts-related { margin: 0; text-align: center; font-size: 14px; color: var(--muted); line-height: 1.8; }
.ts-related a { color: var(--primary); font-weight: 600; }

/* ---------- FAQ ---------- */
.ts-faq { display: flex; flex-direction: column; gap: 10px; }
.ts-faq-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; background: #fff;
}
.ts-faq-item summary {
  cursor: pointer; font-size: 15px; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.ts-faq-item summary::-webkit-details-marker { display: none; }
.ts-faq-item summary::after { content: '+'; color: var(--primary); font-size: 20px; font-weight: 400; }
.ts-faq-item[open] summary::after { content: '−'; }
.ts-faq-item p { margin: 12px 0 0; font-size: 14px; color: var(--muted); line-height: 1.75; }

@media (min-width: 768px) {
  .ts-diag-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 14px; }
}
