/* ============================================================
   VaultFXReborn — Purple & Gold Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Cinzel:wght@400;600;700&family=Raleway:wght@300;400;500;600&display=swap');

:root {
  --gold:          #d4af37;
  --gold-light:    #f0d060;
  --gold-dim:      #a07c1a;
  --purple:        #3d1a6e;
  --purple-mid:    #5a2d99;
  --purple-light:  #7c4dbf;
  --purple-dark:   #1e0a38;
  --surface:       #12072a;
  --surface2:      #1c0f3a;
  --surface3:      #261545;
  --border:        rgba(212,175,55,0.25);
  --border-glow:   rgba(212,175,55,0.6);
  --text:          #f0e8ff;
  --text-muted:    rgba(240,232,255,0.55);
  --danger:        #e74c3c;
  --success:       #27ae60;
  --warning:       #f39c12;
  --info:          #3498db;
  --radius:        8px;
  --radius-lg:     14px;
  --shadow-gold:   0 0 20px rgba(212,175,55,0.3);
  --shadow-purple: 0 8px 32px rgba(61,26,110,0.6);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Raleway', sans-serif;
  background: var(--surface);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── Background texture ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(93,51,163,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 80%, rgba(212,175,55,0.08) 0%, transparent 55%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255,255,255,0.012) 2px,
      rgba(255,255,255,0.012) 4px
    );
  pointer-events: none;
  z-index: 0;
}

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  height: 72px;
  background: rgba(18, 7, 42, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 24px rgba(0,0,0,0.5);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--purple-mid), var(--gold-dim));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: var(--shadow-gold);
}

.brand-name {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.15rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--gold-light), var(--gold), var(--purple-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.navbar-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.88rem;
  letter-spacing: 0.5px;
  transition: all 0.2s;
}

.navbar-nav a:hover, .navbar-nav a.active {
  color: var(--gold);
  background: rgba(212,175,55,0.1);
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--gold-dim);
  object-fit: cover;
}

.avatar-initials {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-mid), var(--gold-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-light);
  border: 2px solid var(--gold-dim);
  letter-spacing: 0.5px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.4px;
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.4,0,0.2,1);
  white-space: nowrap;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: var(--surface);
  box-shadow: 0 3px 14px rgba(212,175,55,0.35);
}
.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 4px 20px rgba(212,175,55,0.55);
  transform: translateY(-1px);
  color: var(--surface);
}

.btn-purple {
  background: linear-gradient(135deg, var(--purple-mid), var(--purple));
  color: var(--text);
  box-shadow: var(--shadow-purple);
}
.btn-purple:hover {
  background: linear-gradient(135deg, var(--purple-light), var(--purple-mid));
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
  background: rgba(212,175,55,0.07);
}

.btn-discord {
  background: #5865F2;
  color: #fff;
  box-shadow: 0 3px 14px rgba(88,101,242,0.4);
}
.btn-discord:hover {
  background: #4752c4;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(88,101,242,0.55);
}

.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 13px; font-size: 0.78rem; }
.btn-lg { padding: 13px 30px; font-size: 1rem; }

/* ── Cards ── */
.card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: var(--border-glow); box-shadow: var(--shadow-gold); }

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(212,175,55,0.04);
}

.card-header h3 {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body { padding: 24px; }

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  background: var(--surface2);
  padding: 0 2rem;
}

.tab-btn {
  padding: 16px 28px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  transition: color 0.2s;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--purple-light));
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.tab-btn.active { color: var(--gold); }
.tab-btn.active::after { transform: scaleX(1); }
.tab-btn:hover { color: var(--gold-light); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Forms ── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.form-control {
  width: 100%;
  padding: 11px 15px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Raleway', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-control:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.12);
  background: rgba(255,255,255,0.06);
}
.form-control::placeholder { color: var(--text-muted); }
select.form-control option { background: var(--surface2); }
textarea.form-control { resize: vertical; min-height: 120px; }

/* ── Badges / status ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.badge-open     { background: rgba(39,174,96,0.2);  color: #2ecc71; border: 1px solid rgba(39,174,96,0.3); }
.badge-progress { background: rgba(52,152,219,0.2); color: #3498db; border: 1px solid rgba(52,152,219,0.3); }
.badge-resolved { background: rgba(212,175,55,0.2); color: var(--gold); border: 1px solid rgba(212,175,55,0.3); }
.badge-closed   { background: rgba(255,255,255,0.08); color: var(--text-muted); border: 1px solid var(--border); }
.badge-low      { background: rgba(39,174,96,0.15);  color: #2ecc71; }
.badge-medium   { background: rgba(243,156,18,0.15); color: #f39c12; }
.badge-high     { background: rgba(231,76,60,0.15);  color: #e74c3c; }
.badge-urgent   { background: rgba(139,0,0,0.3);     color: #ff4444; border: 1px solid rgba(255,68,68,0.4); animation: pulse 1.5s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,68,68,0); }
  50%       { box-shadow: 0 0 0 5px rgba(255,68,68,0.2); }
}

/* ── Table ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold-dim);
  padding: 13px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.875rem;
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(212,175,55,0.04); }

/* ── Alerts / flash ── */
.alert {
  padding: 13px 18px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 500;
}
.alert-success { background: rgba(39,174,96,0.15); border: 1px solid rgba(39,174,96,0.35); color: #2ecc71; }
.alert-error   { background: rgba(231,76,60,0.15); border: 1px solid rgba(231,76,60,0.35); color: #e74c3c; }
.alert-info    { background: rgba(212,175,55,0.1); border: 1px solid rgba(212,175,55,0.3); color: var(--gold); }

/* ── Main layout ── */
.main-content { position: relative; z-index: 1; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.page-hero {
  padding: 60px 2rem 40px;
  text-align: center;
  position: relative;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 100% at 50% 0%, rgba(93,51,163,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 40%, var(--purple-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.15;
  margin-bottom: 14px;
  letter-spacing: 1px;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  font-weight: 400;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Gold divider ── */
.gold-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0;
  opacity: 0.5;
}

/* ── Ticket list ── */
.ticket-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}
.ticket-row:hover {
  border-color: var(--border);
  background: rgba(212,175,55,0.04);
}
.ticket-num { font-family: 'Cinzel', serif; font-size: 0.78rem; color: var(--gold-dim); font-weight: 600; }
.ticket-subject { font-weight: 500; font-size: 0.9rem; }
.ticket-meta { font-size: 0.78rem; color: var(--text-muted); }

/* ── Stat cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--purple-light));
}

.stat-card:hover { box-shadow: var(--shadow-gold); border-color: var(--border-glow); }

.stat-value {
  font-family: 'Cinzel', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.stat-icon { font-size: 1.8rem; opacity: 0.6; position: absolute; right: 18px; top: 18px; }

/* ── FiveM section ── */
.fivem-hero {
  position: relative;
  padding: 60px 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  margin-bottom: 32px;
}

.fivem-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 80% at 50% 50%, rgba(93,51,163,0.25) 0%, transparent 70%),
    linear-gradient(180deg, rgba(212,175,55,0.06) 0%, transparent 100%);
  pointer-events: none;
}

.fivem-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 900;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.fivem-server-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(212,175,55,0.1);
  border: 1px solid var(--border-glow);
  border-radius: 30px;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 1px;
  margin: 14px auto;
  position: relative;
  z-index: 1;
}

.fivem-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 28px;
  position: relative;
  z-index: 1;
}

.fivem-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.info-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: all 0.2s;
}
.info-item:hover { border-color: var(--border-glow); box-shadow: var(--shadow-gold); }
.info-item-icon { font-size: 1.8rem; margin-bottom: 12px; }
.info-item h4 { font-family: 'Cinzel', serif; color: var(--gold); font-size: 0.85rem; margin-bottom: 8px; letter-spacing: 1px; text-transform: uppercase; }
.info-item p { color: var(--text-muted); font-size: 0.85rem; line-height: 1.6; }

/* ── Login / Register page ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-purple);
}

.auth-card-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.3rem;
  font-weight: 900;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-bottom: 8px;
}

.auth-subtitle { color: var(--text-muted); font-size: 0.875rem; }

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Ticket detail ── */
.ticket-detail-header {
  padding: 28px 32px;
  border-bottom: 1px solid var(--border);
}

.ticket-detail-title {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 12px;
}

.ticket-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.meta-chip strong { color: var(--text); }

/* ── Reply thread ── */
.reply-thread { display: flex; flex-direction: column; gap: 16px; }

.reply {
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  position: relative;
}

.reply.user-reply { background: var(--surface3); }
.reply.staff-reply { background: rgba(212,175,55,0.05); border-color: rgba(212,175,55,0.2); }

.reply-author { font-weight: 600; font-size: 0.85rem; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.reply-author .staff-tag { font-size: 0.7rem; background: rgba(212,175,55,0.2); color: var(--gold); padding: 2px 8px; border-radius: 10px; }
.reply-date { font-size: 0.75rem; color: var(--text-muted); }
.reply-message { font-size: 0.9rem; line-height: 1.6; white-space: pre-wrap; }

/* ── Admin sidebar ── */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 72px); }

.admin-sidebar {
  background: rgba(18,7,42,0.8);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
}

.sidebar-section { margin-bottom: 8px; }
.sidebar-label {
  padding: 8px 22px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-dim);
  font-family: 'Cinzel', serif;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
  border-right: 2px solid transparent;
}
.sidebar-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.sidebar-link.active { color: var(--gold); background: rgba(212,175,55,0.06); border-right-color: var(--gold); }

.admin-main { padding: 32px; overflow: auto; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  position: relative;
  z-index: 1;
  background: rgba(18,7,42,0.8);
}
footer span { color: var(--gold-dim); }

/* ── Animations ── */
@keyframes fadeIn   { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes shimmer  { 0%,100% { opacity:.6; } 50% { opacity:1; } }
@keyframes goldGlow { 0%,100% { text-shadow: 0 0 10px rgba(212,175,55,0); } 50% { text-shadow: 0 0 20px rgba(212,175,55,0.5); } }

.animate-fade { animation: fadeIn 0.4s ease forwards; }
.animate-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-delay-3 { animation-delay: 0.3s; opacity: 0; }
.animate-delay-4 { animation-delay: 0.4s; opacity: 0; }

/* ── Utility ── */
.text-gold     { color: var(--gold) !important; }
.text-muted    { color: var(--text-muted) !important; }
.text-center   { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 12px; }
.gap-3 { gap: 20px; }
.w-full { width: 100%; }
.page-pad { padding: 36px 0; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--purple-mid); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

/* ── Mobile ── */
@media (max-width: 768px) {
  .navbar { padding: 0 1rem; }
  .brand-name { font-size: 0.95rem; }
  .navbar-nav { display: none; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-main { padding: 20px; }
  .page-hero { padding: 40px 1rem 24px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 28px 22px; }
  .tabs { padding: 0 1rem; }
  .tab-btn { padding: 14px 14px; font-size: 0.75rem; }
  .ticket-row { grid-template-columns: 1fr; gap: 6px; }
}
