/* پشتیبانی — چیدمان پایدار */
.support-page { width: 100%; max-width: 1100px; margin: 0 auto; }
.support-page__head { margin-bottom: 16px; }

.support-inbox {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  min-height: 520px;
  width: 100%;
}

@media (max-width: 900px) {
  .support-inbox {
    grid-template-columns: 1fr;
    min-height: auto;
  }
}

.support-inbox__list,
.support-inbox__thread {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.support-inbox__list {
  padding: 14px;
}

.support-inbox__thread {
  padding: 16px;
  min-height: 480px;
}

.support-inbox__list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.support-input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  font: inherit;
  background: #fff;
  color: inherit;
}

.support-textarea {
  resize: vertical;
  min-height: 72px;
}

.support-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.support-ticket-list {
  flex: 1;
  overflow: auto;
  max-height: 280px;
  margin-bottom: 8px;
}

.support-new {
  border-top: 1px solid #eef2f7;
  padding-top: 12px;
  margin-top: auto;
}

.support-new__title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #334155;
}

.support-item {
  display: block;
  width: 100%;
  text-align: right;
  border: 1px solid transparent;
  background: #f8fafc;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.support-item:hover {
  border-color: #fdba74;
  background: #fff7ed;
}

.support-item.is-active {
  border-color: #fb923c;
  background: #fff7ed;
}

.support-item__top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.support-item__meta {
  font-size: 11px;
  color: #94a3b8;
  display: block;
  margin-top: 4px;
}

.support-pill {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  white-space: nowrap;
}
.support-pill.is-open { background: #dbeafe; color: #1d4ed8; }
.support-pill.is-wait-staff { background: #ffedd5; color: #c2410c; }
.support-pill.is-wait-user { background: #dcfce7; color: #15803d; }
.support-pill.is-closed { background: #f1f5f9; color: #64748b; }

.support-thread__title {
  font-weight: 700;
  margin-bottom: 10px;
  min-height: 24px;
}

.support-thread__body {
  flex: 1;
  overflow: auto;
  min-height: 220px;
  padding: 8px 4px;
}

.support-thread__composer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-end;
  border-top: 1px solid #eef2f7;
  padding-top: 12px;
  margin-top: 8px;
}

.support-thread__composer .support-textarea {
  flex: 1;
  min-width: 200px;
  margin-bottom: 0;
}

.support-thread__actions {
  margin: 8px 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.support-msg { margin-bottom: 10px; display: flex; }
.support-msg.is-staff { justify-content: flex-start; }
.support-msg.is-user { justify-content: flex-end; }
.support-msg__bubble {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.6;
  background: #f1f5f9;
}
.support-msg.is-staff .support-msg__bubble {
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
.support-msg.is-user .support-msg__bubble {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.support-empty {
  color: #94a3b8;
  font-size: 13px;
  padding: 28px 16px;
  text-align: center;
}

.support-mode-badge.is-staff {
  color: #c2410c;
  font-weight: 600;
}

/* جلوگیری از کش آمدن کل داشبورد */
.dash-section[data-section="support"] {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
