/* Support desk — matches DUJN home */
.support-main {
  position: relative;
  z-index: 1;
  width: min(880px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.2rem 0 5rem;
}
.support-main .eyebrow { margin: 0 0 0.4rem; }
.support-main h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  letter-spacing: -0.035em;
  font-weight: 600;
}
.support-lead {
  margin: 0 0 1.6rem;
  color: var(--muted);
  max-width: 42rem;
}

.discord-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--accent-line);
  background: rgba(232, 160, 32, 0.08);
}
.discord-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 38rem;
}
.discord-strip .btn { flex-shrink: 0; }

.support-gate {
  padding: 1.4rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(12, 12, 12, 0.88);
}
.support-gate p { margin: 0 0 1rem; color: var(--muted); }
.support-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.support-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 840px) {
  .support-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}
.support-panel {
  padding: 1.15rem 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(12, 12, 12, 0.88);
}
.support-panel h2 {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
}
.support-panel .field textarea {
  min-height: 140px;
  resize: vertical;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #101010;
  color: #f4f2ee;
}
.support-panel .field input,
.support-panel .field select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #161616;
  color: #f4f2ee;
}
.support-panel .field select option,
.support-panel .field select optgroup {
  color: #1a1a1a;
  background: #f4f2ee;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.9rem;
}
.filter-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: #101010;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.filter-chip:hover { border-color: var(--accent-line); color: var(--text); }
.filter-chip.is-active {
  color: #0c0c0c;
  background: var(--accent);
  border-color: var(--accent);
}
.filter-chip.is-active:hover { color: #0c0c0c; }

.ticket-list { display: flex; flex-direction: column; gap: 0.55rem; }
.ticket-row {
  display: block;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0c0c0c;
}
.ticket-row:hover { border-color: var(--accent-line); }
.ticket-row strong { display: block; margin-bottom: 0.2rem; }
.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--mono);
}
.ticket-preview {
  margin: 0.4rem 0 0;
  color: var(--faint);
  font-size: 0.86rem;
}
.status-pill {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--line);
}
.status-open, .status-waiting { color: #f0a020; border-color: rgba(240,160,32,.35); }
.status-answered {
  color: #3dd68c;
  border-color: rgba(61, 214, 140, 0.55);
  background: rgba(61, 214, 140, 0.12);
  font-weight: 700;
}
.status-closed { color: var(--muted); }

.thread {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  margin: 1.1rem 0 1.3rem;
  overflow-y: auto;
  padding-right: 0.15rem;
}
.bubble {
  max-width: 82%;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #101010;
}
.bubble.staff {
  margin-left: auto;
  background: rgba(232, 160, 32, 0.08);
  border-color: var(--accent-line);
}
.bubble .who {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem;
}
.staff-chip {
  display: inline-block;
  padding: 0.04rem 0.34rem;
  border-radius: 999px;
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
  color: #e8a020;
  border: 1px solid #e8a020;
  line-height: 1.3;
}
.bubble p { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 0.92rem; }

.reply-sticky {
  position: sticky;
  bottom: 0.6rem;
  z-index: 3;
  box-shadow: 0 -14px 36px rgba(0, 0, 0, 0.5);
}
.reply-kbd {
  margin: -0.35rem 0 0.7rem;
  font-size: 0.75rem;
  color: var(--faint);
  font-family: var(--mono);
}
.close-row { margin-top: 0.85rem; }

body.ticket-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body.ticket-page .nav { flex-shrink: 0; }
body.ticket-page .support-main.ticket-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: min(880px, 100%);
  margin: 0 auto;
  padding: 1rem 1rem 0;
}
.ticket-head {
  flex-shrink: 0;
  padding: 0.1rem 0 0.25rem;
}
.ticket-head .eyebrow { margin: 0 0 0.2rem; font-size: 0.7rem; }
body.ticket-page .ticket-head h1 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.ticket-head .support-lead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  max-width: none;
}
.meta-pill {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
}
body.ticket-page .thread {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  margin: 0.55rem 0 0;
  padding: 0.15rem 0.15rem 0.7rem;
}
body.ticket-page .reply-sticky,
body.ticket-page #replyBox {
  position: sticky;
  bottom: 0;
  flex-shrink: 0;
  z-index: 6;
  margin: 0 -1rem 0;
  width: calc(100% + 2rem);
  max-width: none;
  border-radius: 16px 16px 0 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  padding: 0.55rem 1rem calc(0.55rem + env(safe-area-inset-bottom));
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.45);
}
.reply-bar {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}
.reply-compose {
  display: flex;
  flex: 1;
  align-items: flex-end;
  gap: 0.5rem;
  min-width: 0;
}
.reply-compose[hidden] { display: none !important; }
.reply-compose textarea,
body.ticket-page #replyBox textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  resize: none;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #101010;
  color: #f4f2ee;
  font: inherit;
}
.reply-compose .btn.primary {
  flex-shrink: 0;
  padding: 0.55rem 1rem;
}
.btn-text {
  appearance: none;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0.45rem 0.15rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-text:hover { color: var(--text); }
body.ticket-page #replyBox h2 { display: none; }
@media (max-width: 700px) {
  body.ticket-page .reply-sticky,
  body.ticket-page #replyBox {
    position: sticky;
    bottom: 0;
    box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.45);
  }
}

.form-error { color: #ff7a86; font-size: 0.88rem; min-height: 1.1em; }
.form-error:empty { display: none; }
.empty {
  color: var(--muted);
  font-size: 0.92rem;
  padding: 0.85rem 0.15rem 0.35rem;
  line-height: 1.55;
}

body.ticket-page .footer { display: none; }
