/* ─── Support page (v2) ─────────────────────────────────────────
   Prefix: .sup-* (deliberately not .sp-* — that's used by server-page).
*/

.sup-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-dim);
  padding: 8px 0; margin-top: 24px;
  cursor: pointer; transition: 0.2s color; text-decoration: none;
}
.sup-back:hover { color: var(--accent); }
.sup-back:hover svg { transform: translateX(-2px); }
.sup-back svg { transition: 0.2s transform; }

/* hero */
.sup-head { margin: 16px 0 26px; }
.sup-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  color: var(--text-faint); text-transform: uppercase;
  margin-bottom: 14px;
}
.sup-eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse 1.6s ease-in-out infinite;
}
.sup-title {
  font-size: 36px; font-weight: 600; letter-spacing: -0.022em;
  line-height: 1.1; margin: 0 0 12px; color: var(--text);
}
.sup-title em { font-style: normal; color: var(--accent); }
.sup-sub {
  font-size: 14px; color: var(--text-dim); line-height: 1.6;
  margin: 0; max-width: 680px;
}

/* anonymous CTA card (shown to unauthenticated visitors) */
.sup-anon {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 26px;
  border: 1px solid rgba(54,255,122,0.18);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(54,255,122,0.04), transparent 70%),
    var(--bg-1);
}
.sup-anon-ic {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(54,255,122,0.14);
  border: 1px solid rgba(54,255,122,0.3);
  color: var(--accent);
  display: grid; place-items: center;
}
.sup-anon-body { flex: 1; min-width: 0; }
.sup-anon-body h3 {
  margin: 0 0 6px;
  font-size: 16px; font-weight: 600; color: var(--text);
}
.sup-anon-body p {
  margin: 0 0 14px;
  font-size: 13px; color: var(--text-dim); line-height: 1.6;
}

/* main grid */
.sup-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}
.sup-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-1);
  padding: 22px 24px;
  position: relative;
}
.sup-card-h {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.sup-card-h h3 {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.sup-card-h h3 .pill {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  font-family: var(--mono); font-size: 11px;
  background: var(--bg-3);
  border-radius: 999px;
  color: var(--text-dim);
}
.sup-card-aside {
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  text-transform: uppercase;
}

/* ticket-list filter */
.sup-tk-filter {
  display: inline-flex; gap: 4px; padding: 3px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.sup-tk-filter button {
  padding: 5px 11px;
  font-family: inherit; font-size: 12px;
  background: transparent; border: 0;
  color: var(--text-faint);
  border-radius: 6px;
  cursor: pointer;
  transition: 0.15s;
}
.sup-tk-filter button:hover { color: var(--text); }
.sup-tk-filter button.on {
  background: rgba(54,255,122,0.10);
  color: var(--accent);
}

/* ticket list */
.sup-tk-list { display: flex; flex-direction: column; gap: 8px; }
.sup-tk[data-sup-hidden="1"] { display: none; }
.sup-tk {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  overflow: hidden;
  transition: 0.18s;
}
.sup-tk:hover { border-color: var(--line-strong); }
.sup-tk.expanded { background: var(--bg-1); border-color: rgba(54,255,122,0.25); }

.sup-tk-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  width: 100%;
  background: transparent; border: 0;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: 0.18s;
}
.sup-tk-head:hover { background: rgba(255,255,255,0.02); }
.sup-tk.expanded .sup-tk-head { border-bottom: 1px solid var(--line); }

.sup-tk-num {
  flex-shrink: 0;
  font-family: var(--mono); font-size: 11px;
  color: var(--text-faint);
  padding-top: 1px;
  letter-spacing: 0.04em;
}
.sup-tk-body { flex: 1; min-width: 0; }
.sup-tk-title-row {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.sup-tk-title {
  font-size: 13.5px; font-weight: 500; color: var(--text);
  line-height: 1.4;
}
.sup-tk-meta {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px;
  color: var(--text-faint);
  flex-wrap: wrap;
}
.sup-tk-meta .dot { color: rgba(255,255,255,0.15); }
.sup-tk-meta .sup-tk-cat { color: var(--text-dim); }
.sup-tk-meta .replies .num { color: var(--accent); font-weight: 600; }

/* status pills */
.sup-tk-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 10px;
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.1em; text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid transparent;
}
.sup-tk-status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.sup-tk-open    { color: var(--accent);  background: rgba(54,255,122,0.10); border-color: rgba(54,255,122,0.30); }
.sup-tk-waiting { color: var(--warn);    background: rgba(245,185,74,0.10); border-color: rgba(245,185,74,0.30); }
.sup-tk-answered{ color: #6eb4ff;        background: rgba(110,180,255,0.10); border-color: rgba(110,180,255,0.30); }
.sup-tk-closed  { color: var(--text-faint); background: var(--bg-3);          border-color: var(--line); }

.sup-tk-chev {
  flex-shrink: 0;
  color: var(--text-faint);
  margin-top: 4px;
  transition: 0.18s transform;
}
.sup-tk.expanded .sup-tk-chev { transform: rotate(180deg); color: var(--accent); }

/* expand body */
.sup-tk-expand {
  display: none;
  padding: 16px 18px 18px;
}
.sup-tk.expanded .sup-tk-expand { display: block; animation: supExpand 0.2s ease-out; }
@keyframes supExpand {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sup-tk-thread { display: flex; flex-direction: column; gap: 14px; }
.sup-msg {
  display: flex; gap: 11px;
  padding: 12px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.sup-msg-admin {
  background: rgba(54,255,122,0.04);
  border-color: rgba(54,255,122,0.20);
}
.sup-msg-av {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a4f3a, #15201a);
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 11px; font-weight: 600;
  color: var(--accent);
}
.sup-msg-av-admin {
  background: linear-gradient(135deg, var(--accent), #1bd065);
  color: #03110a;
  border-color: transparent;
}
.sup-msg-body { flex: 1; min-width: 0; }
.sup-msg-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px;
  margin-bottom: 5px;
}
.sup-msg-author { font-weight: 500; color: var(--text); }
.sup-msg-role {
  padding: 1px 6px;
  font-family: var(--mono); font-size: 9.5px;
  background: rgba(54,255,122,0.14);
  color: var(--accent);
  border: 1px solid rgba(54,255,122,0.30);
  border-radius: 4px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.sup-msg-when { color: var(--text-faint); font-family: var(--mono); font-size: 11px; }
.sup-msg-text {
  font-size: 13px; color: var(--text); line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

/* reply form inside expanded ticket */
.sup-reply {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.sup-reply-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px;
  gap: 10px;
}

.sup-closed-note {
  margin-top: 14px;
  padding: 10px 14px;
  font-size: 12px; color: var(--text-faint);
  background: var(--bg-2);
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
}

/* empty state */
.sup-tk-empty {
  display: flex; align-items: center; gap: 14px;
  padding: 28px 18px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--text-faint);
  font-size: 13px;
}
.sup-tk-empty-ic {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--bg-3);
  display: grid; place-items: center;
  color: var(--text-faint);
}

/* ─── form (right card) ─── */
.sup-form { }
.sup-field { margin-bottom: 16px; }
.sup-field-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-bottom: 16px;
}
.sup-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-dim);
  margin-bottom: 8px; font-weight: 500;
}
.sup-label .req { color: var(--danger); font-size: 11px; }
.sup-label .hint {
  margin-left: auto;
  font-family: var(--mono); font-size: 10.5px;
  color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.1em;
}

.sup-input {
  display: block; width: 100%;
  padding: 11px 14px;
  font-family: var(--mono); font-size: 13px;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: 0.18s;
  resize: vertical;
}
.sup-input::placeholder { color: var(--text-faint); }
.sup-input:hover { border-color: var(--line-2); }
.sup-input:focus {
  border-color: var(--accent);
  background: var(--bg-1);
  box-shadow: 0 0 0 3px rgba(54,255,122,0.10);
}
.sup-textarea { min-height: 86px; line-height: 1.55; font-family: inherit; font-size: 13.5px; }

/* category radio cards */
.sup-cat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.sup-cat-opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 12px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
  cursor: pointer;
  transition: 0.18s;
  position: relative;
}
.sup-cat-opt:hover { border-color: var(--line-strong); background: var(--bg-3); }
.sup-cat-opt.on {
  border-color: rgba(54,255,122,0.40);
  background: rgba(54,255,122,0.04);
}
.sup-cat-opt input[type="radio"] {
  position: absolute; opacity: 0; pointer-events: none;
}
.sup-cat-ic {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid; place-items: center;
  border: 1px solid;
}
.sup-cat-name { font-size: 13px; font-weight: 500; color: var(--text); }
.sup-cat-desc {
  font-family: var(--mono); font-size: 10.5px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

@media (max-width: 540px) {
  .sup-cat-grid { grid-template-columns: 1fr; }
}

/* form footer (submit row) */
.sup-form-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 18px; margin-top: 4px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap; gap: 12px;
}
.sup-info-line {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  color: var(--text-faint); text-transform: uppercase;
}
.sup-help { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }

/* buttons */
.sup-btn {
  font-size: 13px; padding: 10px 18px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  color: var(--text);
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: inherit; font-weight: 500;
  transition: 0.18s;
}
.sup-btn:hover { border-color: var(--line-strong); background: var(--bg-3); }
.sup-btn.primary {
  background: var(--accent); color: #03110a;
  border-color: transparent;
  box-shadow: 0 6px 18px -8px var(--accent-glow);
}
.sup-btn.primary:hover { background: #4dff8a; box-shadow: 0 10px 26px -6px var(--accent-glow); }
.sup-btn.primary:disabled, .sup-btn:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

/* error banner */
.sup-error {
  margin: 0 0 16px;
  padding: 10px 14px;
  font-size: 13px; color: #ff8b8b;
  background: rgba(255,94,94,0.08);
  border: 1px solid rgba(255,94,94,0.28);
  border-radius: 10px;
}

/* ─── responsive ─── */
@media (max-width: 1080px) {
  .sup-grid { grid-template-columns: 1fr; }
  .sup-title { font-size: 30px; }
}
@media (max-width: 540px) {
  .sup-card { padding: 18px 16px; }
  .sup-card-h { flex-direction: column; align-items: flex-start; gap: 10px; }
  .sup-tk-head { padding: 12px 14px; }
  .sup-form-footer { flex-direction: column; align-items: stretch; }
  .sup-form-footer .sup-btn { justify-content: center; }
}
