/* =============================================
   SUPPORT TICKETS – shared styles
   Used by /contact, /ticket, /dashboard and /admin/tickets
   ============================================= */
.t-card-title { font-size: 1.35rem; font-weight: 800; color: #fff; margin-bottom: 18px; letter-spacing: -0.02em; }
.t-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.t-row[hidden], .t-field[hidden] { display: none; }
.t-field { margin-bottom: 16px; }
.t-field label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 7px; }
.t-field input, .t-field select, .t-field textarea, .t-reply textarea, .t-select {
  width: 100%; background: var(--bg-ele); border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 12px 14px; color: #fff; font-family: 'Poppins', sans-serif; font-size: 0.92rem; outline: none;
  transition: border-color 0.2s;
}
.t-field textarea, .t-reply textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
.t-field input:focus, .t-field select:focus, .t-field textarea:focus, .t-reply textarea:focus, .t-select:focus { border-color: var(--primary); }
.t-field input::placeholder, .t-field textarea::placeholder, .t-reply textarea::placeholder { color: var(--text-dim); }
.t-field select option, .t-select option { background: #161926; }
.t-help { font-size: 0.82rem; color: var(--primary-soft); margin-top: 8px; line-height: 1.5; min-height: 1em; }
.t-error { color: #ff6b6b; font-size: 0.88rem; min-height: 1.2em; margin-bottom: 10px; }
.t-submit { width: 100%; justify-content: center; }
.t-submit:disabled { opacity: 0.6; cursor: default; transform: none; }

/* Status pills */
.t-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; white-space: nowrap; }
.t-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.t-status.open     { background: rgba(52,81,231,0.14); color: #8fa8ff; border: 1px solid rgba(52,81,231,0.3); }
.t-status.awaiting { background: rgba(251,191,36,0.1); color: #fbbf24; border: 1px solid rgba(251,191,36,0.25); }
.t-status.closed   { background: rgba(255,255,255,0.05); color: var(--text-dim); border: 1px solid var(--border); }

/* Ticket list */
.t-list { display: flex; flex-direction: column; gap: 10px; }
.t-item {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 20px; cursor: pointer; text-align: left; width: 100%;
  font-family: 'Poppins', sans-serif; color: inherit; transition: border-color 0.2s, background 0.2s;
}
.t-item:hover { border-color: rgba(52,81,231,0.45); }
.t-item.active { border-color: var(--primary); background: #12162a; }
.t-item-subject { font-size: 0.95rem; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-item-meta { grid-column: 1 / -1; display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.78rem; color: var(--text-dim); }
.t-item-meta .mono { font-family: 'Courier New', monospace; color: var(--text-muted); }
.t-badge-new { color: #fbbf24; font-weight: 700; }

/* Conversation */
.t-thread-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.t-thread-title { font-size: 1.25rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; margin-bottom: 4px; }
.t-thread-sub { font-size: 0.82rem; color: var(--text-dim); }
.t-thread-sub .mono { font-family: 'Courier New', monospace; color: var(--text-muted); }
.t-details { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.t-chip { font-size: 0.78rem; color: var(--text-muted); background: var(--bg-ele); border-radius: 8px; padding: 5px 10px; }
.t-chip strong { color: #fff; font-weight: 600; }
.t-messages { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.t-msg { max-width: 85%; border-radius: 14px; padding: 14px 16px; border: 1px solid var(--border); background: var(--bg-card2); }
.t-msg.staff { align-self: flex-start; border-color: rgba(52,81,231,0.35); background: #12162a; }
.t-msg.customer { align-self: flex-end; }
.t-msg-head { display: flex; justify-content: space-between; gap: 14px; font-size: 0.76rem; color: var(--text-dim); margin-bottom: 6px; }
.t-msg-head strong { color: #fff; font-weight: 700; }
.t-msg.staff .t-msg-head strong { color: var(--primary-soft); }
.t-msg-body { font-size: 0.92rem; color: var(--text-muted); line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.t-reply { border-top: 1px solid var(--border); padding-top: 18px; }
.t-reply-actions { display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.t-reply-actions .right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.t-closed-note { font-size: 0.88rem; color: var(--text-dim); text-align: center; padding: 12px; background: var(--bg-ele); border-radius: 10px; }
.t-empty { text-align: center; padding: 56px 20px; color: var(--text-dim); }
.t-empty i { font-size: 2.2rem; display: block; margin-bottom: 14px; color: rgba(52,81,231,0.5); }
.t-empty p { color: var(--text-muted); font-weight: 600; margin-bottom: 18px; }

@media (max-width: 640px) {
  .t-row { grid-template-columns: 1fr; }
  .t-msg { max-width: 100%; }
}
