/* ============================================================
   VERTEXT PAY — Global Design System
   ============================================================ */

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

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Brand palette */
  --primary:       #6C63FF;
  --primary-light: #8B85FF;
  --primary-dark:  #4B44CC;
  --accent:        #00D9A5;
  --accent-light:  #26FFB8;
  --danger:        #FF4D6D;
  --warning:       #FFB547;
  --success:       #00D9A5;

  /* Surfaces */
  --bg-base:       #0A0A12;
  --bg-card:       #12121E;
  --bg-elevated:   #1A1A2E;
  --bg-hover:      #20203A;
  --border:        rgba(108, 99, 255, 0.15);
  --border-hover:  rgba(108, 99, 255, 0.35);

  /* Text */
  --text-primary:  #F0EFFF;
  --text-secondary:#A8A6C8;
  --text-muted:    #5E5C7A;

  /* Gradients */
  --grad-primary:  linear-gradient(135deg, #6C63FF 0%, #00D9A5 100%);
  --grad-card:     linear-gradient(145deg, #12121E 0%, #1A1A2E 100%);
  --grad-glow:     radial-gradient(ellipse at 50% 0%, rgba(108,99,255,0.25) 0%, transparent 70%);

  /* Spacing */
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  /* Shadows */
  --shadow-card:  0 4px 24px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.04) inset;
  --shadow-glow:  0 0 40px rgba(108,99,255,0.3);
  --shadow-btn:   0 4px 20px rgba(108,99,255,0.4);
  --shadow-accent:0 4px 20px rgba(0,217,165,0.35);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 200ms;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-base);
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Layout ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navbar ────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(10,10,18,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--duration) var(--ease);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.logo-icon {
  width: 36px; height: 36px;
  background: var(--grad-primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108,99,255,0.5);
  filter: brightness(1.08);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn-accent {
  background: var(--accent);
  color: #0A0A12;
  font-weight: 700;
  box-shadow: var(--shadow-accent);
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,217,165,0.45);
  filter: brightness(1.08);
}

.btn-danger {
  background: rgba(255,77,109,0.15);
  color: var(--danger);
  border: 1px solid rgba(255,77,109,0.25);
}
.btn-danger:hover {
  background: rgba(255,77,109,0.25);
}

.btn-lg { padding: 14px 30px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-sm { padding: 7px 14px; font-size: 13px; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  filter: none !important;
}

/* Loading spinner in button */
.btn .spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: none;
}
.btn.loading .spinner { display: block; }
.btn.loading .btn-text { opacity: 0.7; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px;
  transition: border-color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}

.card:hover { border-color: var(--border-hover); }

/* ── Form Inputs ───────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-input {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 15px;
  width: 100%;
  transition: border-color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.2);
}

.form-input::placeholder { color: var(--text-muted); }

.form-input.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(255,77,109,0.15);
}

/* ── Alert/Toast Messages ─────────────────────────────────── */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
}

.alert-success {
  background: rgba(0,217,165,0.12);
  border: 1px solid rgba(0,217,165,0.25);
  color: var(--accent);
}

.alert-error {
  background: rgba(255,77,109,0.12);
  border: 1px solid rgba(255,77,109,0.25);
  color: var(--danger);
}

.alert-info {
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.25);
  color: var(--primary-light);
}

/* ── Toast Notification ────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  animation: slideInRight 0.3s var(--ease);
  min-width: 280px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.success {
  background: #0D2E27;
  border: 1px solid rgba(0,217,165,0.3);
  color: var(--accent);
}

.toast.error {
  background: #2E0D17;
  border: 1px solid rgba(255,77,109,0.3);
  color: var(--danger);
}

.toast.info {
  background: #16143A;
  border: 1px solid rgba(108,99,255,0.3);
  color: var(--primary-light);
}

.toast.fade-out {
  animation: slideOutRight 0.3s var(--ease) forwards;
}

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s var(--ease);
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
}

.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all var(--duration) var(--ease);
}
.modal-close:hover { color: var(--text-primary); background: var(--bg-hover); }

/* ── Badge ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-success { background: rgba(0,217,165,0.15); color: var(--accent); }
.badge-pending { background: rgba(255,181,71,0.15); color: var(--warning); }
.badge-failed  { background: rgba(255,77,109,0.15); color: var(--danger); }
.badge-deposit { background: rgba(108,99,255,0.15); color: var(--primary-light); }
.badge-withdrawal { background: rgba(0,217,165,0.10); color: #6BFFE0; }

/* ── Utilities ─────────────────────────────────────────────── */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }

/* ── Divider ───────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ── Skeleton loader ───────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-hover) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes slideOutRight {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(120%); opacity: 0; }
}

@keyframes fadeInUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .modal { padding: 24px; }
  h1 { font-size: clamp(28px, 8vw, 52px); }
  #toast-container { right: 12px; bottom: 12px; }
}
