﻿/* ===== SUPPORT SYSTEM STYLES ===== */
.support-overlay {
  position: fixed; inset: 0; background: rgba(5,8,15,0.75); backdrop-filter: blur(10px);
  z-index: 100000; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.35s cubic-bezier(0.4,0,0.2,1);
}
.support-overlay.show { opacity: 1; pointer-events: auto; }
.support-modal {
  background: linear-gradient(155deg, #131b2e, #1a2236 40%, #151c2c); width: 520px; max-width: 94vw; max-height: 90vh;
  border-radius: 18px; border: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04), inset 0 1px 0 rgba(255,255,255,0.06);
  transform: translateY(30px) scale(0.96); transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.support-overlay.show .support-modal { transform: translateY(0) scale(1); }

.support-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px; border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.15);
}
.support-header-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 800; letter-spacing: 0.3px;
  background: linear-gradient(90deg, #fff, #b0bcd9); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.support-header-icon {
  width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(0,149,255,0.25), rgba(0,200,83,0.15));
  border: 1px solid rgba(0,149,255,0.3); font-size: 18px;
}
.support-tabs {
  display: flex; gap: 4px; padding: 16px 24px 0; background: rgba(0,0,0,0.1);
}
.support-tab {
  flex: 1; text-align: center; padding: 12px 8px; border-radius: 10px 10px 0 0;
  font-size: 13px; font-weight: 700; color: var(--text3); cursor: pointer;
  transition: all 0.25s; background: rgba(255,255,255,0.02); border: 1px solid transparent;
  border-bottom: none; position: relative;
}
.support-tab:hover { color: var(--text2); background: rgba(255,255,255,0.04); }
.support-tab.active {
  color: #fff; background: rgba(0,149,255,0.12);
  border-color: rgba(0,149,255,0.3) rgba(0,149,255,0.3) transparent;
}
.support-tab.active::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--green));
}
.support-tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; border-radius: 9px; font-size: 10px;
  font-weight: 800; margin-left: 6px; padding: 0 5px;
  background: rgba(0,149,255,0.2); color: var(--blue);
}
.support-tab.active .support-tab-badge {
  background: var(--blue); color: #fff;
}

.support-body {
  flex: 1; overflow-y: auto; padding: 0;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.support-body::-webkit-scrollbar { width: 5px; }
.support-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* New Ticket Form */
.support-form { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 16px; }
.sf-group { display: flex; flex-direction: column; gap: 6px; }
.sf-label {
  font-size: 12px; font-weight: 700; color: var(--text2);
  letter-spacing: 0.3px; text-transform: uppercase;
}
.sf-select, .sf-textarea {
  background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; color: #fff; font-size: 14px; font-family: 'Inter', sans-serif;
  padding: 12px 14px; transition: all 0.25s; outline: none;
}
.sf-select:focus, .sf-textarea:focus {
  border-color: rgba(0,149,255,0.5); box-shadow: 0 0 0 3px rgba(0,149,255,0.1);
}
.sf-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px; }
.sf-select option { background: #1a2236; color: #fff; }
.sf-textarea { resize: vertical; min-height: 100px; max-height: 200px; line-height: 1.5; }
.sf-textarea::placeholder { color: var(--text3); }

.sf-upload-zone {
  border: 2px dashed rgba(255,255,255,0.1); border-radius: 12px; padding: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; transition: all 0.25s; background: rgba(0,0,0,0.15);
  position: relative; overflow: hidden;
}
.sf-upload-zone:hover { border-color: rgba(0,149,255,0.4); background: rgba(0,149,255,0.05); }
.sf-upload-zone.has-file { border-color: rgba(0,200,83,0.4); background: rgba(0,200,83,0.05); }
.sf-upload-icon { font-size: 28px; opacity: 0.6; }
.sf-upload-text { font-size: 13px; color: var(--text3); text-align: center; }
.sf-upload-text strong { color: var(--blue); }
.sf-upload-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sf-upload-preview {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: rgba(0,200,83,0.08); border: 1px solid rgba(0,200,83,0.2);
  border-radius: 8px; width: 100%;
}
.sf-upload-preview img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }
.sf-preview-info { flex: 1; }
.sf-preview-name { font-size: 12px; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.sf-preview-size { font-size: 10px; color: var(--text3); }
.sf-preview-remove {
  background: rgba(255,23,68,0.15); border: 1px solid rgba(255,23,68,0.3); color: var(--red2);
  border-radius: 6px; width: 28px; height: 28px; display: flex; align-items: center;
  justify-content: center; cursor: pointer; font-size: 14px; transition: all 0.2s;
}
.sf-preview-remove:hover { background: rgba(255,23,68,0.3); transform: scale(1.1); }

.sf-submit-btn {
  background: linear-gradient(135deg, #0095ff, #0070cc); color: #fff;
  border: none; border-radius: 10px; padding: 14px; font-size: 15px; font-weight: 800;
  cursor: pointer; transition: all 0.3s; display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 15px rgba(0,149,255,0.3); letter-spacing: 0.3px;
}
.sf-submit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,149,255,0.4); }
.sf-submit-btn:active { transform: translateY(0); }

/* My Tickets List */
.tickets-list { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.ticket-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 50px 20px; text-align: center; color: var(--text3);
}
.ticket-empty-icon {
  width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  font-size: 28px; margin-bottom: 16px;
}
.ticket-empty p { font-size: 14px; line-height: 1.6; max-width: 260px; }

.ticket-card {
  background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 14px 16px; cursor: pointer; transition: all 0.25s;
  display: flex; flex-direction: column; gap: 8px;
}
.ticket-card:hover { background: rgba(0,149,255,0.06); border-color: rgba(0,149,255,0.2); transform: translateX(3px); }
.ticket-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ticket-id {
  font-size: 11px; font-weight: 800; color: var(--blue);
  background: rgba(0,149,255,0.12); padding: 3px 8px; border-radius: 6px;
}
.ticket-status {
  font-size: 10px; font-weight: 800; padding: 3px 10px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.ticket-status.open { background: rgba(0,200,83,0.15); color: var(--green); border: 1px solid rgba(0,200,83,0.3); }
.ticket-status.closed { background: rgba(255,255,255,0.05); color: var(--text3); border: 1px solid rgba(255,255,255,0.08); }
.ticket-card-cat {
  display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text3);
}
.ticket-card-cat-icon { font-size: 14px; }
.ticket-card-subject { font-size: 14px; font-weight: 700; color: #fff; line-height: 1.4; }
.ticket-card-preview { font-size: 12px; color: var(--text3); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ticket-card-footer { display: flex; align-items: center; justify-content: space-between; }
.ticket-card-time { font-size: 10px; color: var(--text3); }
.ticket-card-msgs {
  font-size: 10px; font-weight: 700; color: var(--blue);
  display: flex; align-items: center; gap: 4px;
}

/* Ticket Conversation View */
.ticket-convo { display: flex; flex-direction: column; height: 100%; }
.ticket-convo-header {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06); background: rgba(0,0,0,0.1);
}
.ticket-back-btn {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text2); border-radius: 8px; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  font-size: 16px; transition: all 0.2s;
}
.ticket-back-btn:hover { background: rgba(0,149,255,0.15); color: var(--blue); }
.ticket-convo-info { flex: 1; }
.ticket-convo-title { font-size: 14px; font-weight: 700; color: #fff; }
.ticket-convo-meta { font-size: 11px; color: var(--text3); display: flex; align-items: center; gap: 8px; margin-top: 2px; }

.ticket-messages {
  flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.ticket-messages::-webkit-scrollbar { width: 4px; }
.ticket-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

.msg-bubble {
  max-width: 85%; padding: 12px 16px; border-radius: 14px; font-size: 13px; line-height: 1.55;
  animation: msgSlideIn 0.3s ease;
}
@keyframes msgSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg-user {
  align-self: flex-end; background: linear-gradient(135deg, rgba(0,149,255,0.25), rgba(0,100,200,0.2));
  border: 1px solid rgba(0,149,255,0.2); color: #e0eeff; border-bottom-right-radius: 4px;
}
.msg-support {
  align-self: flex-start; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06); color: var(--text2); border-bottom-left-radius: 4px;
}
.msg-support-label {
  font-size: 10px; font-weight: 800; color: var(--green); margin-bottom: 4px;
  display: flex; align-items: center; gap: 5px;
}
.msg-time { font-size: 10px; color: var(--text3); margin-top: 6px; text-align: right; }
.msg-img { max-width: 200px; max-height: 150px; border-radius: 8px; margin-top: 8px; cursor: pointer; }

.ticket-reply-bar {
  display: flex; flex-direction: column; gap: 0;
  border-top: 1px solid rgba(255,255,255,0.06); background: rgba(0,0,0,0.15);
}
.ticket-reply-img-preview {
  display: none; align-items: center; gap: 10px;
  padding: 10px 16px 4px; background: rgba(0,149,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  animation: fadeInUp 0.25s ease;
}
.reply-preview-thumb {
  width: 52px; height: 52px; border-radius: 8px; object-fit: cover;
  border: 1.5px solid rgba(0,149,255,0.35);
}
.reply-preview-info { flex: 1; }
.reply-preview-name { font-size: 11px; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.reply-preview-size { font-size: 10px; color: var(--text3); margin-top: 2px; }
.reply-preview-remove {
  background: rgba(255,50,50,0.15); border: 1px solid rgba(255,50,50,0.3);
  border-radius: 50%; width: 24px; height: 24px; color: #ff6b6b;
  cursor: pointer; font-size: 12px; display: flex; align-items: center;
  justify-content: center; transition: all 0.2s; flex-shrink: 0;
}
.reply-preview-remove:hover { background: rgba(255,50,50,0.3); transform: scale(1.1); }
.ticket-reply-row {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
}
.ticket-reply-input {
  flex: 1; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; color: #fff; padding: 10px 14px; font-size: 13px;
  font-family: 'Inter', sans-serif; outline: none; transition: border-color 0.2s;
}
.ticket-reply-input:focus { border-color: rgba(0,149,255,0.4); }
.ticket-reply-input::placeholder { color: var(--text3); }
.ticket-attach-btn {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; width: 40px; height: 40px; color: var(--text3);
  font-size: 17px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: all 0.2s; flex-shrink: 0;
}
.ticket-attach-btn:hover { background: rgba(0,149,255,0.12); border-color: rgba(0,149,255,0.3); color: #0095ff; transform: scale(1.05); }
.ticket-attach-btn.has-img { background: rgba(0,149,255,0.15); border-color: rgba(0,149,255,0.5); color: #0095ff; }
.ticket-send-btn {
  background: linear-gradient(135deg, #0095ff, #0070cc); color: #fff;
  border: none; border-radius: 10px; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px; transition: all 0.2s;
  box-shadow: 0 2px 10px rgba(0,149,255,0.3); flex-shrink: 0;
}
.ticket-send-btn:hover { transform: scale(1.08); box-shadow: 0 4px 15px rgba(0,149,255,0.4); }

/* Success Animation */
.ticket-success {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 24px; text-align: center; animation: fadeInUp 0.5s ease;
}
@keyframes fadeInUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.ticket-success-icon {
  width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(0,200,83,0.2), rgba(0,200,83,0.08));
  border: 2px solid rgba(0,200,83,0.4); font-size: 36px; margin-bottom: 20px;
  animation: successPop 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes successPop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
.ticket-success h3 { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.ticket-success p { font-size: 13px; color: var(--text3); line-height: 1.5; max-width: 300px; }
.ticket-success-id {
  margin-top: 16px; padding: 8px 20px; border-radius: 8px;
  background: rgba(0,149,255,0.1); border: 1px solid rgba(0,149,255,0.25);
  font-size: 14px; font-weight: 800; color: var(--blue);
}
.ticket-success-btn {
  margin-top: 20px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: #fff; border-radius: 10px; padding: 10px 24px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.ticket-success-btn:hover { background: rgba(0,149,255,0.15); border-color: rgba(0,149,255,0.3); }

/* Responsive: mobile < 768px */
