/* Help & support page */
.tab-view.sp-page.active { display: flex; flex-direction: column; gap: 1rem; max-width: 1000px; }

.sp-hero, .sp-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 12px);
}
.sp-hero { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem; }
.sp-hero h2 { margin: 0 0 0.3rem; font-size: 1.3rem; }
.sp-hero p { margin: 0; color: var(--text-secondary); font-size: 0.92rem; line-height: 1.55; }
.sp-hero-icon {
  flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--primary-light, rgba(99, 102, 241, 0.12)); color: var(--primary); font-size: 1.2rem;
}

.sp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1rem; align-items: start; }
.sp-card { padding: 1rem 1.25rem; }
.sp-card h3 { margin: 0 0 0.75rem; font-size: 1rem; }
.sp-field { margin-bottom: 0.8rem; }
.sp-field label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 0.3rem; }
.sp-label-row { display: flex; justify-content: space-between; align-items: baseline; }
.sp-count { font-size: 0.75rem; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.sp-error { color: var(--danger, #dc2626); font-size: 0.85rem; margin: 0 0 0.6rem; }
.sp-related {
  display: flex; align-items: center; gap: 0.4rem; font-size: 0.84rem; margin-bottom: 0.8rem;
  padding: 0.5rem 0.7rem; border-radius: 8px; background: var(--bg-primary); border: 1px solid var(--border-color);
}
.sp-related[hidden] { display: none; }
.sp-related i { color: var(--primary); }
.sp-related .btn { margin-left: auto; }

.sp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.sp-empty { color: var(--text-secondary); font-size: 0.88rem; }
.sp-item { border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden; }
.sp-item.is-unread { border-color: var(--primary); }
.sp-item-head {
  width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 0.75rem; text-align: left;
  padding: 0.7rem 0.85rem; background: none; border: 0; cursor: pointer; color: inherit; font: inherit;
}
.sp-item-head:hover { background: var(--bg-primary); }
.sp-item-title { font-weight: 600; font-size: 0.9rem; overflow-wrap: anywhere; }
.sp-item-meta { grid-column: 1; font-size: 0.78rem; color: var(--text-secondary); }
.sp-status { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 0.74rem; font-weight: 600; padding: 0.15rem 0.55rem; border-radius: 999px; border: 1px solid var(--border-color); color: var(--text-secondary); white-space: nowrap; }
.sp-status.is-in_progress { color: var(--primary); border-color: currentColor; }
.sp-status.is-resolved, .sp-status.is-closed { color: var(--success, #15803d); border-color: currentColor; }
.sp-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-right: 0.4rem; vertical-align: middle; }

.sp-thread { padding: 0 0.85rem 0.85rem; }
.sp-thread ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.sp-thread li { padding: 0.55rem 0.7rem; border-radius: 8px; background: var(--bg-primary); border: 1px solid var(--border-color); max-width: 92%; }
.sp-thread li.is-team { align-self: flex-start; border-color: var(--primary); }
.sp-thread li:not(.is-team) { align-self: flex-end; }
.sp-thread p { margin: 0.2rem 0 0; font-size: 0.86rem; white-space: pre-line; overflow-wrap: anywhere; }
.sp-thread-meta { font-size: 0.74rem; color: var(--text-secondary); }
.sp-reply { margin-top: 0.6rem; display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-end; }
.sp-reply textarea { width: 100%; }
.sp-note { font-size: 0.82rem; color: var(--text-secondary); margin: 0.6rem 0 0; }
.sp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.nav-badge {
  margin-left: auto; min-width: 1.15rem; padding: 0 0.35rem; border-radius: 999px; background: var(--primary);
  color: #fff; font-size: 0.7rem; line-height: 1.15rem; text-align: center;
}

@media (max-width: 860px) {
  .sp-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .sp-hero, .sp-card { padding: 0.9rem 1rem; }
}
