@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
  --bg: #0a0a0f;
  --bg2: #13131a;
  --bg3: #1c1c26;
  --bg4: #252533;
  --accent: #7c3aed;
  --accent2: #a855f7;
  --accent3: #c084fc;
  --gold: #f59e0b;
  --green: #10b981;
  --red: #ef4444;
  --blue: #3b82f6;
  --t1: #f1f0ff;
  --t2: #a09cb8;
  --t3: #6b6680;
  --border: #2a2a3a;
  --border2: #3a3a50;
  --r: 10px;
  --r2: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-accent: 0 8px 32px rgba(124,58,237,0.2);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--t1);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Utilities */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes scanLine { 0%,100% { top: 10%; } 50% { top: 85%; } }

.fade-in { animation: fadeIn 0.3s ease; }
.spin { animation: spin 1s linear infinite; }
.pulse { animation: pulse 2s ease-in-out infinite; }

/* Card */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  overflow: hidden;
}
.card-body { padding: 20px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent2); transform: translateY(-1px); box-shadow: var(--shadow-accent); }
.btn-secondary { background: var(--bg3); color: var(--t1); border: 1px solid var(--border2); }
.btn-secondary:hover:not(:disabled) { border-color: var(--accent); color: var(--accent3); }
.btn-danger { background: rgba(239,68,68,.1); color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,.2); }
.btn-ghost { background: transparent; color: var(--t2); border: 1px solid var(--border); }
.btn-ghost:hover:not(:disabled) { background: var(--bg3); color: var(--t1); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 12px; }

/* Forms */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 13px; color: var(--t2); font-weight: 500; }
.input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--t1);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,58,237,.15); }
.input::placeholder { color: var(--t3); }
.input.error { border-color: var(--red); }
.textarea { min-height: 100px; resize: vertical; }
.select { appearance: none; cursor: pointer; }
.error-msg { font-size: 12px; color: var(--red); margin-top: 2px; }

/* Badge/Pill */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.badge-free { background: rgba(16,185,129,.15); color: #6ee7b7; border: 1px solid rgba(16,185,129,.3); }
.badge-paid { background: rgba(245,158,11,.15); color: #fcd34d; border: 1px solid rgba(245,158,11,.3); }
.badge-approved { background: rgba(16,185,129,.15); color: #6ee7b7; border: 1px solid rgba(16,185,129,.3); }
.badge-pending { background: rgba(245,158,11,.15); color: #fcd34d; border: 1px solid rgba(245,158,11,.3); }
.badge-rejected { background: rgba(239,68,68,.15); color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }
.badge-valid { background: rgba(16,185,129,.15); color: #6ee7b7; border: 1px solid rgba(16,185,129,.3); }
.badge-used { background: rgba(107,102,128,.15); color: var(--t3); border: 1px solid var(--border); }
.badge-expired { background: rgba(239,68,68,.15); color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }
.badge-featured { background: rgba(124,58,237,.2); color: var(--accent3); border: 1px solid rgba(124,58,237,.4); }

/* Stats */
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 20px;
}
.stat-value { font-size: 28px; font-weight: 700; margin-bottom: 4px; }
.stat-label { font-size: 13px; color: var(--t2); }
.stat-change { font-size: 12px; margin-top: 6px; }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-accent { color: var(--accent3); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--t2); }
.text-sm { font-size: 12px; color: var(--t2); }
.text-xs { font-size: 11px; color: var(--t3); }

/* Table */
.table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th { background: var(--bg3); padding: 11px 16px; text-align: left; color: var(--t2); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
tbody td { padding: 13px 16px; border-top: 1px solid var(--border); vertical-align: middle; }
tbody tr:hover td { background: var(--bg3); }

/* Progress */
.progress { height: 6px; background: var(--bg4); border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width 0.4s; }

/* Avatar */
.avatar {
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

/* Divider */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: var(--t2); }
.empty-icon { font-size: 52px; margin-bottom: 16px; }

/* Skeleton */
.skeleton { background: var(--bg3); border-radius: 6px; animation: pulse 1.5s ease-in-out infinite; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.75);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s;
}
.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeIn 0.2s;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 24px; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 24px; border-top: 1px solid var(--border); }

/* Responsive */
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hide-mobile { display: none !important; }
}
@media (max-width: 480px) {
  .container { padding: 0 14px; }
}
