@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #0a0c10;
  --bg-secondary: #121620;
  --bg-tertiary: #1a2030;
  --accent-primary: #8a2be2;      /* Neon purple */
  --accent-secondary: #00ffff;    /* Cyan */
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --border-color: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(18, 22, 32, 0.6);
  --glass-border: rgba(255, 255, 255, 0.05);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
}

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

body {
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(138, 43, 226, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 255, 255, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

a {
  color: var(--accent-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}
a:hover {
  color: #fff;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
}

/* Glassmorphism utility */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
}

/* Landing Page Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  position: relative;
}

.hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 30%, var(--accent-secondary) 70%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2.5rem;
}

.glow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, var(--accent-primary) 0%, #6366f1 100%);
  color: #fff;
  box-shadow: 0 0 20px rgba(138, 43, 226, 0.4);
  position: relative;
  overflow: hidden;
}

.glow-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(138, 43, 226, 0.6), 0 0 10px rgba(0, 255, 255, 0.3);
}

.glow-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
}

.glow-btn:hover::before {
  left: 100%;
}

.secondary-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  box-shadow: none;
  margin-left: 1rem;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-secondary);
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

/* Navbar */
.navbar {
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 4rem;
  z-index: 100;
}

.logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* Card */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.feature-card {
  padding: 2.5rem;
  text-align: left;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(138, 43, 226, 0.3);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(138, 43, 226, 0.1);
}

.feature-card .icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(138, 43, 226, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  border: 1px solid rgba(138, 43, 226, 0.2);
}

.feature-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Dashboard Layout */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-menu {
  list-style: none;
  margin-top: 3rem;
}

.sidebar-item {
  margin-bottom: 0.5rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s ease;
}

.sidebar-link:hover, .sidebar-link.active {
  background: rgba(138, 43, 226, 0.15);
  color: #fff;
}

.sidebar-link svg {
  width: 20px;
  height: 20px;
}

.main-content {
  flex: 1;
  padding: 3rem;
  overflow-y: auto;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.header-row h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 600;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  padding: 1.5rem;
}

.stat-card .label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.stat-card .value {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0.5rem 0;
  font-family: 'Outfit', sans-serif;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-secondary);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.15);
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  cursor: pointer;
}

.form-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-primary);
}

/* Code box */
.code-box {
  background: #05070a;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.25rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.875rem;
  color: #a78bfa;
  overflow-x: auto;
  margin: 1rem 0;
  position: relative;
}

.code-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

.copy-btn {
  background: transparent;
  border: none;
  color: var(--accent-secondary);
  cursor: pointer;
  font-weight: 600;
}
.copy-btn:hover {
  text-decoration: underline;
}

/* Tab menu */
.tab-menu {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.tab-btn {
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn.active {
  color: var(--accent-secondary);
  border-bottom-color: var(--accent-secondary);
}

/* Tables */
.table-container {
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  padding: 1rem;
  border-bottom: 1.5px solid var(--border-color);
  font-weight: 600;
  color: var(--text-secondary);
}

.custom-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.status-badge {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}
.status-badge.pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}
.status-badge.expired {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

/* Checkout Page Specific */
.checkout-card {
  width: 100%;
  max-width: 440px;
  margin: 2rem auto;
  padding: 2.5rem 2rem;
  text-align: center;
}

.merchant-logo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-secondary);
  margin-bottom: 1rem;
}

.checkout-amount {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0.5rem 0 1.5rem;
  font-family: 'Outfit', sans-serif;
  color: #fff;
}

.qr-container {
  background: #fff;
  padding: 1rem;
  border-radius: 16px;
  display: inline-block;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.qr-container img {
  display: block;
  width: 220px;
  height: 220px;
}

.timer {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-secondary);
  margin-bottom: 1.5rem;
}

.deeplink-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: #1e3a8a;
  color: #fff;
  border-radius: 12px;
  padding: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.2s ease;
}

.deeplink-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

/* Success Checkmark Animation */
.success-checkmark {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
}

/* Alert system */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  color: white;
  z-index: 1000;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: none;
  animation: slideIn 0.3s ease;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

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

/* Modal wrapper */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-content {
  width: 90%;
  max-width: 500px;
  padding: 2.5rem;
}

/* =========================================
   MOBILE HAMBURGER BUTTON
   ========================================= */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-primary);
  flex-direction: column;
  gap: 5px;
  z-index: 300;
}
.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 199;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active {
  display: block;
}

/* =========================================
   SMALL MOBILE (≤ 480px)
   ========================================= */
@media (max-width: 480px) {
  /* Landing hero text */
  .hero h1 {
    font-size: 2rem;
    line-height: 1.2;
  }
  .hero p {
    font-size: 0.95rem;
    margin-bottom: 2rem;
  }
  .hero > div {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 320px;
  }
  .glow-btn, .secondary-btn {
    width: 100%;
    text-align: center;
  }
  .secondary-btn {
    margin-left: 0;
  }
  .navbar {
    padding: 1rem 1.25rem;
  }
  .nav-links {
    gap: 0.75rem;
  }
  .card-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
    margin: 2rem auto;
    gap: 1.25rem;
  }
  .feature-card {
    padding: 1.5rem;
  }
}

/* =========================================
   TABLET & MOBILE (≤ 768px)
   ========================================= */
@media (max-width: 768px) {
  /* Navbar */
  .navbar {
    padding: 1rem 1.5rem;
  }
  .nav-links {
    gap: 0.75rem;
  }

  /* Hero */
  .hero h1 {
    font-size: 2.4rem;
  }
  .hero p {
    font-size: 1rem;
  }

  /* ---- DASHBOARD LAYOUT ---- */
  .dashboard-container {
    display: block;
    position: relative;
  }

  /* Sidebar: slide-in drawer from left */
  .sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100vh;
    z-index: 200;
    border-right: 1px solid var(--border-color);
    border-bottom: none;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding: 1.5rem 1.25rem;
  }
  .sidebar.open {
    left: 0;
  }
  .sidebar .logo {
    margin-top: 0.5rem;
  }
  .sidebar-menu {
    display: flex;
    flex-direction: column;
    margin-top: 2rem;
    gap: 0.25rem;
  }

  /* Main content: full width, add top bar */
  .main-content {
    padding: 0;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
  }

  /* Mobile top bar */
  .mobile-topbar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 150;
  }
  .mobile-topbar .logo {
    font-size: 1.1rem;
  }

  /* Hamburger button visible on mobile */
  .mobile-menu-btn {
    display: flex;
  }

  /* Content inner padding */
  .main-content-inner {
    padding: 1.25rem;
    padding-bottom: 5rem; /* leave room for bottom nav */
  }

  /* Header row */
  .header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }
  .header-row h2 {
    font-size: 1.4rem;
  }

  /* Stats grid: 2 columns on mobile */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }
  .stat-card {
    padding: 1rem;
  }
  .stat-card .value {
    font-size: 1.35rem;
  }

  /* Tables: horizontal scroll */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
  }
  .custom-table {
    min-width: 520px;
  }
  .custom-table th,
  .custom-table td {
    padding: 0.65rem 0.75rem;
    font-size: 0.825rem;
  }

  /* Tabs: scrollable horizontal row */
  .tab-menu {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    padding-bottom: 0;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .tab-menu::-webkit-scrollbar { display: none; }
  .tab-btn {
    white-space: nowrap;
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
    flex-shrink: 0;
  }

  /* Checkout card: full screen on mobile */
  .checkout-card {
    max-width: 100%;
    margin: 0;
    padding: 1.5rem 1.25rem;
    border-radius: 0;
    min-height: 100vh;
    border: none;
  }
  .qr-container img {
    width: 180px;
    height: 180px;
  }
  .checkout-amount {
    font-size: 1.85rem;
  }

  /* Forms */
  .form-group {
    margin-bottom: 1rem;
  }
  .form-control {
    font-size: 16px; /* prevents iOS zoom on focus */
    padding: 0.7rem 0.9rem;
  }

  /* Code box */
  .code-box {
    font-size: 0.75rem;
    word-break: break-all;
  }

  /* Modal */
  .modal-content {
    width: 95%;
    padding: 1.5rem;
    margin: auto 2.5%;
  }

  /* Toast: bottom-left on mobile to avoid floating buttons */
  .toast {
    bottom: 5rem;
    right: 1rem;
    left: 1rem;
    text-align: center;
  }

  /* Glass cards inside content */
  .glass {
    border-radius: 12px;
  }

  /* Bottom navigation bar */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 0.5rem 0 0.75rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .mobile-bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.25rem 0;
    transition: color 0.2s;
    text-shadow: none;
  }
  .mobile-bottom-nav a svg {
    width: 22px;
    height: 22px;
  }
  .mobile-bottom-nav a.active,
  .mobile-bottom-nav a:hover {
    color: var(--accent-secondary);
    text-shadow: none;
  }
}

/* =========================================
   HIDE mobile-only elements on desktop
   ========================================= */
.mobile-topbar { display: none; }
.mobile-bottom-nav { display: none; }

