/* =========================================================
   VELVET ADMIN SUPPORT — Final Gold Luxury Edition
   Consistent with Velvet Admin aesthetic
========================================================= */

:root {
  --gold: #d4af37;
  --gold-dark: #b38e2e;
  --surface: #121212;
  --card: #1a1a1a;
  --border: #2b2b2b;
  --text: #f5f5f5;
  --muted: #aaa;
  --success: #00ff83;
  --danger: #ff4a5e;
  --pending: #ffd83d;
}

/* ---------- Section Layout ---------- */
.adminsupport-section {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 32px;
  color: var(--text);
  font-family: "Inter", sans-serif;
  box-sizing: border-box;
}

/* ---------- Header ---------- */
.adminsupport-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 22px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.adminsupport-header h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 10px;
}

.adminsupport-header i {
  color: var(--gold);
}

/* ---------- Filters ---------- */
.adminsupport-filters {
  display: flex;
  gap: 12px;
  align-items: center;
}

.adminsupport-filters select,
.adminsupport-filters input {
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.25s ease;
}

.adminsupport-filters select:focus,
.adminsupport-filters input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

/* ---------- Ticket Grid ---------- */
.adminsupport-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---------- Ticket Card ---------- */
.ticket-card {
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 14px;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.ticket-card:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 28px rgba(212, 175, 55, 0.25);
  transform: translateY(-2px);
}

/* ---------- Ticket Info ---------- */
.ticket-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  font-family: "Playfair Display", serif;
  margin-bottom: 4px;
}

.ticket-info p {
  font-size: 0.9rem;
  color: var(--text);
}

.ticket-info .status {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
}

/* ---------- Status Colors ---------- */
.status.open {
  background: rgba(0, 255, 136, 0.1);
  color: var(--success);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.status.pending {
  background: rgba(255, 210, 0, 0.1);
  color: var(--pending);
  border: 1px solid rgba(255, 210, 0, 0.3);
}

.status.resolved {
  background: rgba(0, 136, 255, 0.1);
  color: #4db8ff;
  border: 1px solid rgba(0, 136, 255, 0.3);
}

/* ---------- Ticket Actions ---------- */
.ticket-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ticket-actions button {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.ticket-actions button:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
}

/* ---------- Modal (Chat) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-overlay.open {
  display: flex;
}

.modal-box.chat-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 480px;
  max-width: 90vw;
  height: 600px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  position: relative;
  animation: fadeInUp 0.3s ease;
}

/* ---------- Modal Header ---------- */
.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
}

.chat-header .status {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 600;
}

/* ---------- Chat Messages ---------- */
.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-message {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}

.chat-message.user {
  align-self: flex-start;
}

.chat-message.admin {
  align-self: flex-end;
  text-align: right;
}

/* ---------- Message Bubble ---------- */
.msg-bubble {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.4;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  position: relative;
}

.chat-message.user .msg-bubble {
  background: rgba(255, 255, 255, 0.04);
}

.chat-message.admin .msg-bubble {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #000;
  font-weight: 600;
}

.msg-bubble small {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- Chat Input ---------- */
.chat-input {
  display: flex;
  padding: 14px;
  border-top: 1px solid var(--border);
  background: #151515;
  border-radius: 0 0 16px 16px;
}

.chat-input input {
  flex: 1;
  background: #111;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  outline: none;
  font-size: 0.9rem;
  transition: all 0.25s ease;
}

.chat-input input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

.chat-input button {
  background: var(--gold);
  border: none;
  color: #000;
  border-radius: 10px;
  padding: 0 14px;
  margin-left: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.chat-input button:hover {
  transform: translateY(-1px);
  background: var(--gold-dark);
  box-shadow: 0 6px 16px rgba(212, 175, 55, 0.35);
}

/* ---------- Close Button ---------- */
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  color: var(--muted);
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s ease;
}

.modal-close:hover {
  color: var(--gold);
}

/* ---------- No Results ---------- */
.no-results {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  margin-top: 20px;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .adminsupport-header {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .adminsupport-filters {
    justify-content: center;
    flex-wrap: wrap;
  }

  .ticket-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .chat-box {
    height: 80vh;
  }
}

/* ========= Admin Support — Page Header ========= */
.adminsupport-header{
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 24px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(212,175,55,.15);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  border-radius: 14px;
  backdrop-filter: blur(6px);
}

/* -------- Title -------- */
.adminsupport-header .title{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--gold, #d4af37);
  text-shadow: 0 0 10px rgba(212,175,55,.4);
  letter-spacing: .25px;
}
.adminsupport-header .title i{
  font-size: 1.2rem;
  opacity: .9;
}

/* -------- Tools -------- */
.adminsupport-header .tools{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Selects / Inputs */
.adminsupport-header select,
.adminsupport-header input[type="search"]{
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  color: var(--text, #f5f5f5);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.adminsupport-header select:hover,
.adminsupport-header input[type="search"]:hover{
  border-color: rgba(212,175,55,.25);
}
.adminsupport-header select:focus,
.adminsupport-header input[type="search"]:focus{
  border-color: rgba(212,175,55,.5);
  box-shadow: 0 0 0 3px rgba(212,175,55,.12);
}
.adminsupport-header input[type="search"]{
  width: min(340px, 40vw);
}

/* Buttons */
.adminsupport-header .btn-gold,
.adminsupport-header .chip{
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  font-weight: 500;
  border: 1px solid rgba(212,175,55,.35);
  background: transparent;
  color: var(--gold, #d4af37);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .2s ease;
}
.adminsupport-header .btn-gold:hover,
.adminsupport-header .chip:hover{
  background: linear-gradient(90deg, rgba(212,175,55,.12), rgba(212,175,55,.05));
  border-color: rgba(212,175,55,.5);
  transform: translateY(-1px);
}
.adminsupport-header .btn-gold:active{
  transform: translateY(1px);
}

/* -------- Badge para status -------- */
.adminsupport-header .status-badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gold, #d4af37);
  background: rgba(212,175,55,.08);
  border: 1px solid rgba(212,175,55,.25);
}
.adminsupport-header .status-badge i{ font-size: 0.9rem; }

/* -------- Responsive -------- */
@media (max-width: 900px){
  .adminsupport-header{
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
    border-radius: 10px;
    gap: 12px;
  }
  .adminsupport-header .title{ font-size: 1.15rem; }
  .adminsupport-header .tools{
    width: 100%;
    flex-wrap: wrap;
  }
  .adminsupport-header input[type="search"]{
    width: 100%;
  }
}
