/* ===== TouchPayCards - Premium Styles ===== */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

/* CSS Variables */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222240;
  --surface: #16162a;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --text-primary: #ffffff;
  --text-secondary: #a0a0b8;
  --text-muted: #6b6b80;
  --accent-gold: #ffffff;
  --accent-gold-light: #e0e0e0;
  --accent-gold-dark: #cccccc;
  --accent-tron: #00d4aa;
  --accent-tron-bg: rgba(0, 212, 170, 0.08);
  --accent-eth: #8b5cf6;
  --accent-eth-bg: rgba(139, 92, 246, 0.08);
  --gradient-gold: linear-gradient(135deg, #ffffff 0%, #e0e0e0 50%, #ffffff 100%);
  --btn-gold: linear-gradient(135deg, #f0b90b 0%, #fcd535 50%, #f0b90b 100%);
  --gradient-dark: linear-gradient(180deg, #0a0a0f 0%, #12121a 100%);
  --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
  --gradient-hero: linear-gradient(135deg, #0a0a0f 0%, #1a1025 50%, #0a0a0f 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 4px 24px rgba(255, 255, 255, 0.1);
  --shadow-btn: 0 4px 24px rgba(240, 185, 11, 0.25);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* ===== LIGHT THEME (Dashboard & Admin) ===== */
.light-theme {
  --bg-primary: #f4f5f7;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f1f5;
  --surface: #f8f9fb;
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.14);
  --text-primary: #1a1a2e;
  --text-secondary: #5a5a72;
  --text-muted: #8a8a9e;
  --accent-gold: #d4a007;
  --accent-gold-light: #f0b90b;
  --accent-gold-dark: #b8900a;
  --gradient-dark: linear-gradient(180deg, #f4f5f7 0%, #ffffff 100%);
  --gradient-card: linear-gradient(135deg, rgba(0,0,0,0.01) 0%, rgba(0,0,0,0.02) 100%);
  --gradient-hero: linear-gradient(135deg, #f4f5f7 0%, #eee8f4 50%, #f4f5f7 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.1);
  --shadow-gold: 0 4px 24px rgba(240, 185, 11, 0.15);
  --gradient-gold: linear-gradient(135deg, #f0b90b 0%, #fcd535 50%, #f0b90b 100%);
  --btn-gold: linear-gradient(135deg, #f0b90b 0%, #fcd535 50%, #f0b90b 100%);
  --shadow-btn: 0 4px 24px rgba(240, 185, 11, 0.2);
  color-scheme: light;
}

/* Light theme component overrides */
.light-theme .navbar {
  background: rgba(10, 10, 15, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.light-theme .navbar.scrolled {
  background: rgba(10, 10, 15, 1);
}
.light-theme .nav-logo {
  color: #ffffff;
}
.light-theme .nav-link {
  color: rgba(255, 255, 255, 0.75);
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
}
.light-theme .nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
/* Hide icons in dashboard desktop navbar — text-only like the home page */
.light-theme .navbar .nav-link svg {
  display: none;
}
.light-theme .nav-btn {
  color: #000;
}
.light-theme .mobile-toggle {
  color: #ffffff;
}
/* Sidebar is always dark — no light-theme override needed */

/* Light theme modals */
.light-theme .modal-overlay {
  background: rgba(0, 0, 0, 0.4);
}
.light-theme .modal {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12);
}
.light-theme .modal-body {
  color: #1a1a2e;
}
.light-theme .modal-body .form-input,
.light-theme .modal-body select {
  background: #f8f9fb;
  border-color: rgba(0, 0, 0, 0.1);
  color: #1a1a2e;
}
.light-theme .modal-body .form-input:focus,
.light-theme .modal-body select:focus {
  background: #ffffff;
  border-color: rgba(212, 160, 7, 0.5);
}
.light-theme .btn-modal-cancel {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
  color: #5a5a72;
}
.light-theme .btn-modal-cancel:hover {
  background: rgba(0, 0, 0, 0.08);
}
.light-theme .network-option.tron {
  background: rgba(0, 212, 170, 0.06);
  border-color: rgba(0, 212, 170, 0.2);
}
.light-theme .network-option.ethereum {
  background: rgba(139, 92, 246, 0.06);
  border-color: rgba(139, 92, 246, 0.2);
}

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

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

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  font-weight: 400;
}

/* Global: all interactive elements get instant tap + minimum touch target */
button, a, [role="button"], select, input[type="submit"], input[type="button"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-card);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 2rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.95);
  box-shadow: var(--shadow-md);
}

.nav-logo {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: #ffffff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #000;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link svg {
  width: 18px;
  height: 18px;
}

/* Panel link (admin/agent) in dashboard navbar */
.nav-link.panel-link {
  color: #2563eb;
  font-weight: 600;
}
.light-theme .nav-link.panel-link {
  color: #2563eb;
}
.nav-link.panel-link:hover {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.nav-btn {
  background: var(--btn-gold);
  color: #000;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.nav-btn:hover {
  box-shadow: var(--shadow-btn);
  transform: translateY(-1px);
}

/* Hide mobile-only links on desktop */
.mobile-only {
  display: none !important;
}

/* Mobile Menu */
.nav-right-mobile {
  display: none;
  align-items: center;
  gap: 0.75rem;
}
.nav-login-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #ffffff;
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  background: transparent;
  border: none;
  transition: color 0.2s ease;
}
.nav-login-btn:hover {
  color: var(--btn-gold);
}
.nav-login-btn svg {
  flex-shrink: 0;
}
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
}

/* ===== Sidebar Panel (appended to body by JS) ===== */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.sidebar-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.sidebar-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 72%;
  max-width: 320px;
  background: #0a0a0f;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.sidebar-panel.open {
  transform: translateX(0);
}

.sidebar-title {
  padding: 1.25rem 1.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-panel .sidebar-link {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 1.5rem;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-panel .sidebar-link:hover,
.sidebar-panel .sidebar-link.active {
  background: rgba(255,255,255,0.06);
  color: #ffffff;
}

.sidebar-link-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: rgba(255,255,255,0.5);
}
.sidebar-panel .sidebar-link:hover .sidebar-link-icon,
.sidebar-panel .sidebar-link.active .sidebar-link-icon {
  color: #ffffff;
}
.sidebar-link-icon svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 768px) {
  .navbar { height: 64px; padding: 0 1.25rem; }
  .nav-right-mobile { display: flex; }
  .nav-right-mobile .mobile-toggle { display: block; }
  .nav-links { display: none; }
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 72px 2rem 4rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero-bg.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #0a0a1a;
}

/* Dark overlay for text readability */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

/* Subtle gold glow on top */
.hero-bg::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Animated grid background */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

/* Cover watermark in bottom-right of hero image */
.hero-grid::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 220px;
  height: 80px;
  background: radial-gradient(ellipse at bottom right, rgba(10,10,26,1) 0%, rgba(10,10,26,0.95) 40%, transparent 70%);
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  margin-bottom: 2rem;
  animation: fade-in-up 0.8s ease forwards;
}

.hero-badge svg {
  width: 16px;
  height: 16px;
}

.hero-title {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  animation: fade-in-up 0.8s ease 0.1s forwards;
  opacity: 0;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6), 0 1px 3px rgba(0,0,0,0.4);
}

.hero-title .gradient-text {
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #e2e8f0;
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  animation: fade-in-up 0.8s ease 0.2s forwards;
  opacity: 0;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.3);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  animation: fade-in-up 0.8s ease 0.3s forwards;
  opacity: 0;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--btn-gold);
  color: #000;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  box-shadow: var(--shadow-btn);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  padding: 0.85rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* Floating cards animation */
.hero-visual {
  position: absolute;
  bottom: -5%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 900px;
  height: 300px;
  pointer-events: none;
}

.floating-card {
  position: absolute;
  width: 320px;
  height: 200px;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
}

.floating-card-1 {
  background: linear-gradient(135deg, #1a1a2e, #2d1b4e);
  left: 10%;
  bottom: 20%;
  transform: rotate(-8deg);
  animation: float-card-1 6s ease-in-out infinite;
  z-index: 1;
}

.floating-card-2 {
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  left: 50%;
  transform: translateX(-50%) rotate(2deg);
  bottom: 30%;
  animation: float-card-2 7s ease-in-out infinite;
  z-index: 2;
}

.floating-card-3 {
  background: linear-gradient(135deg, #2d1b10, #4a2c17);
  right: 10%;
  bottom: 15%;
  transform: rotate(6deg);
  animation: float-card-3 5s ease-in-out infinite;
  z-index: 1;
}

/* ===== SECTIONS ===== */
.section {
  padding: 6rem 2rem;
  position: relative;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-desc {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ===== SERVICES GRID ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.service-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
}

.service-icon svg {
  width: 28px;
  height: 28px;
}

.service-card h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Service Cards V2 — image cards like competitor */
.services-grid-v2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.service-card-v2 {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.35s ease;
  display: flex;
  flex-direction: column;
}

.service-card-v2:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.service-card-v2-text {
  padding: 1.25rem 1.25rem 0.75rem;
  text-align: center;
}

.service-card-v2-text h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.service-card-v2-text p {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.5;
}

.service-card-v2-img {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  min-height: 200px;
}

.service-card-v2-img svg {
  width: 100%;
  max-width: 260px;
  height: auto;
}

.service-card-v2-img.service-card-v2-photo {
  padding: 0;
  overflow: hidden;
}

.service-card-v2-img.service-card-v2-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 200px;
}

@media (max-width: 768px) {
  .services-grid-v2 {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
}

/* ===== WHY CHOOSE US ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: all 0.4s ease;
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: rgba(255, 255, 255, 0.8);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature-card h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===== TESTIMONIALS MARQUEE ===== */
.marquee-wrapper {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.marquee-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: marquee-scroll 60s linear infinite;
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.testimonial-card {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  min-width: 340px;
  max-width: 340px;
  flex-shrink: 0;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 24px rgba(255, 255, 255, 0.04);
}

.testimonial-card .stars {
  color: var(--accent-gold);
  margin-bottom: 0.75rem;
  font-size: 1rem;
  letter-spacing: 2px;
}

.testimonial-card blockquote {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
  font-style: italic;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial-photo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}

.testimonial-info strong {
  display: block;
  font-size: 0.95rem;
}

.testimonial-info span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== FAQ ===== */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.faq-item.active {
  border-color: rgba(255, 255, 255, 0.15);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color 0.3s ease;
}

.faq-question:hover {
  color: var(--accent-gold);
}

.faq-question svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: var(--text-muted);
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
  color: var(--accent-gold);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 200px;
}

.faq-answer p {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== PAYMENT PARTNERS ===== */
.payment-partners {
  padding: 2.5rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
}

.partners-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.partners-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.partner-logo {
  width: 80px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.partner-logo:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.partner-logo svg {
  width: 100%;
  height: 100%;
}

@media (max-width: 480px) {
  .partners-logos {
    gap: 1.5rem;
  }
  .partner-logo {
    width: 64px;
    height: 40px;
  }
}

/* ===== FOOTER ===== */
.footer {
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== CTA SECTION ===== */
.cta-section {
  padding: 6rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
  border-radius: 50%;
}

.cta-content {
  position: relative;
  z-index: 2;
}

.cta-content h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-content p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* ===== DASHBOARD STYLES ===== */
.dashboard-layout {
  padding-top: 72px;
  min-height: 100vh;
  background: var(--bg-primary);
}

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

/* Balance Section */
.balance-section {
  margin-bottom: 2.5rem;
}

.balance-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.balance-amount {
  font-family: 'DM Sans', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

/* Accounts Section */
.accounts-section {
  margin-bottom: 2.5rem;
}

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

.accounts-header h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.btn-deposit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  min-height: 42px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-deposit:hover {
  background: rgba(240, 185, 11, 0.1);
  border-color: rgba(240, 185, 11, 0.3);
  color: var(--accent-gold);
}

.btn-deposit svg {
  width: 18px;
  height: 18px;
}

.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.account-card {
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.account-card:hover {
  transform: translateY(-2px);
}

.account-card.tron {
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.08) 0%, rgba(0, 212, 170, 0.02) 100%);
  border: 1px solid rgba(0, 212, 170, 0.15);
}

.account-card.tron:hover {
  border-color: rgba(0, 212, 170, 0.3);
  box-shadow: 0 4px 24px rgba(0, 212, 170, 0.1);
}

.account-card.ethereum {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(139, 92, 246, 0.02) 100%);
  border: 1px solid rgba(139, 92, 246, 0.15);
}

.account-card.ethereum:hover {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 4px 24px rgba(139, 92, 246, 0.1);
}

.account-card-icon {
  position: absolute;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  opacity: 0.15;
}

.account-network {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.account-card.tron .account-network { color: var(--accent-tron); }
.account-card.ethereum .account-network { color: var(--accent-eth); }

.account-balance {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.account-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Cards Section */
.cards-section {
  margin-bottom: 2rem;
}

.cards-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.cards-header h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.cards-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.view-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.view-toggle button {
  padding: 0.55rem 0.85rem;
  min-height: 40px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.view-toggle button.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.view-toggle button svg {
  width: 18px;
  height: 18px;
}

.btn-topup {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  min-height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-topup:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-new-card {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  min-height: 40px;
  background: var(--gradient-gold);
  border: none;
  border-radius: var(--radius-sm);
  color: #000;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-new-card:hover {
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.cards-empty {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  text-align: center;
}

.cards-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.cards-empty-icon svg {
  width: 32px;
  height: 32px;
}

.cards-empty p {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.cards-empty a {
  color: var(--accent-gold);
  font-size: 0.9rem;
  text-decoration: none;
}

.cards-empty a:hover {
  text-decoration: underline;
}

/* ===== MODAL ===== */
/*
 * Modal overlay uses display:none/flex — NOT opacity+pointer-events.
 * The opacity+pointer-events trick is unreliable on iOS Safari:
 * pointer-events:none on the overlay can prevent children from receiving
 * touch events even when set to pointer-events:all on .active.
 * display:none guarantees the overlay is truly gone; display:flex
 * guarantees it is fully interactive. No ambiguity.
 */
.modal-overlay {
  display: none; /* hidden — fully removed from interaction */
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
}

.modal-overlay.active {
  display: flex; /* visible — fully interactive, no pointer-events tricks */
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  /* Height cap so body scrolls; header & footer always stay visible */
  max-height: calc(100vh - 2rem);
  max-height: calc(100svh - 2rem); /* stable viewport height on mobile */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Animation lives on the modal box itself, not the overlay */
  opacity: 0;
  transform: scale(0.95) translateY(16px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  position: relative;
}

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

/* Close X button — top-right corner of any modal */
.modal-close-x {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s;
}
.modal-close-x:hover { background: rgba(255,255,255,0.3); }
.light-theme .modal-close-x { background: rgba(255,255,255,0.25); color: #fff; }
.light-theme .modal-close-x:hover { background: rgba(255,255,255,0.45); }

.modal-header {
  background: var(--gradient-gold);
  padding: 2rem;
  color: #000;
  flex-shrink: 0; /* never shrink — always visible */
}

.modal-header h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-header p {
  opacity: 0.7;
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.modal-body {
  padding: 2rem;
  flex: 1;          /* fill available space between header and footer */
  min-height: 0;    /* required for flex children to shrink below content size */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* smooth momentum scrolling on iOS */
}

.modal-body h3 {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.network-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.network-option {
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.network-option.tron {
  background: rgba(0, 212, 170, 0.06);
  border: 2px solid rgba(0, 212, 170, 0.15);
}

.network-option.tron:hover, .network-option.tron.selected {
  border-color: var(--accent-tron);
  background: rgba(0, 212, 170, 0.1);
  box-shadow: 0 0 24px rgba(0, 212, 170, 0.15);
}

.network-option.ethereum {
  background: rgba(139, 92, 246, 0.06);
  border: 2px solid rgba(139, 92, 246, 0.15);
}

.network-option.ethereum:hover, .network-option.ethereum.selected {
  border-color: var(--accent-eth);
  background: rgba(139, 92, 246, 0.1);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.15);
}

.network-option .network-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.network-option h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.network-option .network-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.network-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.network-option.tron .network-badge {
  background: rgba(0, 212, 170, 0.15);
  color: var(--accent-tron);
}

.network-option.ethereum .network-badge {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-eth);
}

/* ===== Deposit Address Cards ===== */
.deposit-address-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}
.deposit-address-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}
.deposit-address-network {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}
.deposit-network-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.deposit-network-dot.tron { background: #ef4444; }
.deposit-network-dot.eth { background: #6366f1; }
.deposit-network-tag {
  font-size: 0.75rem;
  color: #64748b;
  padding: 0.2rem 0.6rem;
  background: #e2e8f0;
  border-radius: 20px;
}
.deposit-address-body {
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.deposit-address-text {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  word-break: break-all;
  color: #1e293b;
  line-height: 1.4;
  user-select: all;
}
.btn-copy-address {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-copy-address:hover { background: #1d4ed8; }
.btn-copy-address.copied {
  background: #22c55e;
}
.deposit-notice {
  margin-top: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #92400e;
  line-height: 1.4;
}
.deposit-notice svg {
  flex-shrink: 0;
  margin-top: 1px;
  stroke: #f59e0b;
}
.deposit-notice p { margin: 0; }

/* ===== Two-Step Deposit Modal ===== */
.dep-modal { max-width: 480px; }

/* dep-modal header: always pinned at top */
.dep-modal-header { flex-shrink: 0; }

/* Step wrappers fill the remaining height as flex columns */
#deposit-step-1,
#deposit-step-2 {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* dep-step-body scrolls; the modal-footer below it stays pinned */
.dep-step-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* X button override for dep-modal (no colored header gradient) */
.dep-close-x {
  background: rgba(0,0,0,0.08);
  color: var(--text-secondary);
}
.dep-close-x:hover { background: rgba(0,0,0,0.16); color: var(--text-primary); }
.light-theme .dep-close-x { background: rgba(0,0,0,0.06); color: #555; }
.light-theme .dep-close-x:hover { background: rgba(0,0,0,0.12); color: #1a1a2e; }

.dep-modal-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}
.light-theme .dep-modal-header { color: #1a1a2e; border-color: rgba(0,0,0,0.08); }
.dep-modal-header svg { flex-shrink: 0; opacity: 0.7; }

.dep-step-body { padding: 1.5rem 1.75rem; }

.dep-choose-title {
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}
.dep-choose-sub {
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 1.4rem;
}

.dep-network-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  margin-bottom: 0.25rem;
}

.dep-network-card {
  border-radius: 16px;
  padding: 1.4rem 1rem 1.1rem;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  /* Reset <button> browser defaults */
  font-family: inherit;
  font-size: inherit;
  background-color: unset; /* overridden by .dep-eth / .dep-tron below */
  width: 100%;
  display: block;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.dep-network-card:hover { transform: translateY(-3px); }

.dep-eth  { background: #f3e5f5; border-color: #e1bee7; }
.dep-tron { background: #e8f5e9; border-color: #c8e6c9; }
.dep-eth:hover  { border-color: #7b1fa2; box-shadow: 0 8px 24px rgba(123,31,162,0.14); }
.dep-tron:hover { border-color: #2e7d32; box-shadow: 0 8px 24px rgba(46,125,50,0.14); }

.dep-network-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.9rem;
}
.dep-eth-circle  { background: #7b1fa2; color: #fff; }
.dep-tron-circle { background: #2e7d32; color: #fff; }

.dep-network-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.2rem;
}
.dep-network-sub {
  font-size: 0.78rem;
  color: #5a5a72;
  margin-bottom: 0.6rem;
}

.dep-network-badge {
  display: inline-block;
  padding: 0.18rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.4px;
}
.dep-eth-badge  { background: rgba(123,31,162,0.1); color: #7b1fa2; border: 1px solid rgba(123,31,162,0.25); }
.dep-tron-badge { background: rgba(46,125,50,0.1);  color: #2e7d32; border: 1px solid rgba(46,125,50,0.25); }

/* Step 2 — QR code */
.dep-qr-wrapper {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.dep-qr-wrapper.ethereum { background: #1565c0; }
.dep-qr-wrapper.tron     { background: #c62828; }

.dep-qr-inner {
  padding: 1rem 1rem 0;
  display: flex;
  justify-content: center;
  min-height: 220px;
  align-items: center;
}
.dep-qr-inner canvas,
.dep-qr-inner img {
  border-radius: 10px;
  display: block;
  max-width: 100%;
}

.dep-qr-label {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.88);
  padding: 0.7rem 0.5rem;
  font-weight: 500;
}

.dep-addr-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.dep-footer-row {
  justify-content: space-between !important;
}

/* Gold Done button (explicit, no cascade conflicts) */
.btn-dep-done {
  padding: 0.65rem 1.75rem;
  background: linear-gradient(135deg, #f0b90b 0%, #fcd535 50%, #f0b90b 100%);
  border: none;
  border-radius: var(--radius-sm);
  color: #000;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.btn-dep-done:hover {
  box-shadow: 0 4px 18px rgba(240,185,11,0.35);
  transform: translateY(-1px);
}

.btn-dep-back {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  touch-action: manipulation; /* remove 300ms iOS tap delay */
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s ease;
}
.btn-dep-back:hover {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border-hover);
}
.light-theme .btn-dep-back { border-color: rgba(0,0,0,0.12); color: #5a5a72; }
.light-theme .btn-dep-back:hover { background: #f0f1f5; color: #1a1a2e; }

.modal-footer {
  padding: 0 2rem 2rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-shrink: 0; /* never shrink — always visible at the bottom */
}

.btn-modal-cancel {
  padding: 0.65rem 1.5rem;
  min-height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.btn-modal-confirm {
  padding: 0.65rem 1.5rem;
  min-height: 44px;
  background: var(--gradient-gold);
  border: none;
  border-radius: var(--radius-sm);
  color: #000;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-modal-confirm:hover {
  box-shadow: var(--shadow-gold);
}

/* ===== AUTH PAGES ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  background: #0a0a0a;
}

.auth-page .hero-bg { display: none; }
.auth-page .hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.auth-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  background: #0d0d0d;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
}

.auth-card .nav-logo {
  justify-content: center;
  margin-bottom: 2rem;
  font-size: 1.75rem;
}

.auth-card h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
}

.auth-card .auth-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

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

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  min-height: 44px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.3s ease;
  outline: none;
}

.form-input:focus {
  border-color: rgba(240, 185, 11, 0.4);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.08);
}

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

.form-actions {
  margin-top: 1.5rem;
}

.btn-auth {
  width: 100%;
  padding: 0.85rem;
  background: var(--gradient-gold);
  border: none;
  border-radius: var(--radius-sm);
  color: #000;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-auth:hover {
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ===== ANIMATIONS ===== */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

@keyframes float-card-1 {
  0%, 100% { transform: rotate(-8deg) translateY(0); }
  50% { transform: rotate(-8deg) translateY(-15px); }
}

@keyframes float-card-2 {
  0%, 100% { transform: translateX(-50%) rotate(2deg) translateY(0); }
  50% { transform: translateX(-50%) rotate(2deg) translateY(-20px); }
}

@keyframes float-card-3 {
  0%, 100% { transform: rotate(6deg) translateY(0); }
  50% { transform: rotate(6deg) translateY(-12px); }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .hero { min-height: 100vh; padding: 5rem 1.25rem 2.5rem; }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; min-height: 48px; }
  .section { padding: 3.5rem 1rem; }
  .section-header { margin-bottom: 2rem; }
  .cta-section { padding: 3.5rem 1rem; }
  .footer { padding: 2rem 1rem; }
  .services-grid, .features-grid { grid-template-columns: 1fr; }
  .testimonial-card { min-width: 280px; max-width: 280px; }
  .accounts-grid { grid-template-columns: 1fr; }
  .network-grid { grid-template-columns: 1fr; }
  .cards-header { flex-direction: column; align-items: flex-start; }
  .modal-overlay { padding: 1rem; }
  .dashboard-layout { padding-top: 64px; }
}

/* ===== PHONE-SPECIFIC ===== */
@media (max-width: 480px) {
  .navbar { height: 60px; padding: 0 1rem; }
  .logo { font-size: 1.15rem; }
  /* sidebar is a separate element on body */
  .hero { min-height: 100vh; padding: 4.5rem 1rem 2rem; }
  .hero-content { max-width: 100%; }
  .hero-title { font-size: 1.75rem; }
  .hero-subtitle { font-size: 0.95rem; margin-bottom: 1.5rem; }
  .hero-badge { font-size: 0.78rem; padding: 0.3rem 0.75rem; margin-bottom: 1.25rem; }
  .hero-actions { gap: 0.5rem; }
  .section-title { font-size: 1.5rem; }
  .section-desc { font-size: 0.95rem; }
  .section { padding: 2.5rem 1rem; }
  .section-header { margin-bottom: 1.5rem; }
  .cta-section { padding: 2.5rem 1rem; }
  .cta-content h2 { font-size: 1.5rem; }
  .cta-content p { font-size: 0.95rem; }
  .footer { padding: 1.5rem 1rem; }
  .btn-primary, .btn-secondary { padding: 0.75rem 1.5rem; font-size: 0.9rem; }
  .modal { max-width: calc(100vw - 1.5rem); }
  .modal-header { padding: 1.25rem; }
  .modal-header h2 { font-size: 1.25rem; gap: 0.5rem; }
  .modal-header p { font-size: 0.85rem; }
  .modal-body { padding: 1.25rem; }
  .modal-body h3 { font-size: 1rem; margin-bottom: 1rem; }
  .modal-footer { padding: 0 1.25rem 1.25rem; }
  .network-option { padding: 1rem; }
  .network-option .network-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
  .network-option h4 { font-size: 0.95rem; }
  .testimonial-card { min-width: 260px; max-width: 260px; padding: 1.25rem; }
  .testimonial-card blockquote { font-size: 0.85rem; }
  .partner-logo { width: 56px; height: 36px; }
  .partners-logos { gap: 1rem; }
  .payment-partners { padding: 2rem 1rem; }
  .feature-card { padding: 1.5rem; }
  .service-card-v2 { border-radius: 12px; }
  .service-card-v2-text { padding: 1rem; }
  .dashboard-layout { padding-top: 60px; }
  .dashboard-content { padding: 0 0.75rem 1.5rem; }
  .dash-section-title { font-size: 1.1rem; }
  .tx-row { padding: 0.75rem 0; }
  .tx-icon { width: 36px; height: 36px; }
  .tx-desc { font-size: 0.85rem; }
  .tx-amount { font-size: 0.9rem; }
}

/* ===== PREMIUM DASHBOARD V2 — Blue Theme ===== */

/* Balance Grid */
/* ===== Dashboard Greeting ===== */
.dash-greeting {
  margin-bottom: 0.5rem;
  animation: dash-fade-in 0.4s ease both;
}

.dash-greeting-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

/* ===== My Balance ===== */
.my-balance-section {
  margin-bottom: 2rem;
  animation: dash-fade-in 0.45s ease both;
}

.my-balance-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.my-balance-amount {
  font-family: 'DM Sans', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

/* ===== My Accounts Section ===== */
.my-accounts-section {
  margin-bottom: 2rem;
  animation: dash-fade-in 0.5s ease both;
}

.my-accounts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.my-accounts-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Deposit to Wallet button */
.btn-deposit-wallet {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 0.6rem 1rem;
  min-height: 42px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-deposit-wallet:hover {
  background: #f4f5f7;
  border-color: rgba(0,0,0,0.2);
}

.btn-deposit-wallet svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-muted);
}

/* ===== Wallet Cards (TRON green, Ethereum pink) ===== */
.wallet-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wallet-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.wallet-card.tron {
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
}

.wallet-card.ethereum {
  background: #f3e5f5;
  border: 1px solid #e1bee7;
}

.wallet-card-content {
  position: relative;
  z-index: 1;
}

.wallet-card-network {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.wallet-card-network.tron-text {
  color: #2e7d32;
}

.wallet-card-network.eth-text {
  color: #7b1fa2;
}

.wallet-card-amount {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: #1a1a2e;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.wallet-card-usdt {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.wallet-card-icon {
  position: relative;
  z-index: 1;
  opacity: 0.2;
}

.wallet-card-icon.tron-icon {
  color: #2e7d32;
}

.wallet-card-icon.eth-icon {
  color: #7b1fa2;
}

/* ===== Cards Section ===== */
.cards-section {
  margin-bottom: 2rem;
  animation: dash-fade-in 0.55s ease both;
}

.cards-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Left block: title + subtitle */
.cards-section-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cards-section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
}

.cards-section-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin: 0;
}

.cards-section-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

/* Top Up Card button */
.btn-topup-card {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-topup-card:hover {
  background: #f4f5f7;
  border-color: rgba(0,0,0,0.2);
}

.btn-topup-card svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* New Card button (dark) */
.btn-new-card {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #1a1a2e;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-new-card:hover {
  background: #2a2a42;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-new-card svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Cards empty message */
.cards-empty-msg {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 12px;
}

.cards-empty-text {
  font-size: 0.9rem;
  color: #5d4037;
  font-weight: 500;
}

.btn-buy-card {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1.15rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-buy-card:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}

.btn-buy-card svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Cards list (vertical stack) */
.cards-scroll {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 0.5rem;
}

/* ===== Virtual Card — Luxury Black ===== */
.virtual-card { display: none; } /* legacy, replaced by .vcard */

.vcard {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1.586;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
  background:
    linear-gradient(135deg, #111111 0%, #1a1a1a 40%, #0d0d0d 70%, #141414 100%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.07),
    0 2px 4px rgba(0,0,0,0.6),
    0 20px 60px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.06);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), box-shadow 0.35s ease;
  cursor: default;
}

.vcard:hover {
  transform: translateY(-5px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.1),
    0 30px 80px rgba(0,0,0,0.8),
    0 0 40px rgba(200,169,81,0.06);
}

/* Gold diagonal shimmer line */
.vcard-shimmer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 18px;
  z-index: 1;
}
.vcard-shimmer::after {
  content: '';
  position: absolute;
  top: -50%; left: -80%;
  width: 40%; height: 220%;
  background: linear-gradient(
    105deg,
    transparent 38%,
    rgba(200,169,81,0.04) 44%,
    rgba(255,255,255,0.07) 50%,
    rgba(200,169,81,0.04) 56%,
    transparent 62%
  );
  transform: translateX(-100%);
  transition: transform 0.8s ease;
}
.vcard:hover .vcard-shimmer::after { transform: translateX(400%); }

/* Ambient gold glow on top-left */
.vcard-glow {
  position: absolute;
  top: -30px; left: -30px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(200,169,81,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Card content sits above decorations */
.vcard > *:not(.vcard-shimmer):not(.vcard-glow) { position: relative; z-index: 2; }

/* Top row */
.vcard-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.25rem 0;
}

.vcard-brand-name {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #e8c96a 0%, #f5e0a0 50%, #c8a951 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.vcard-status {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  text-transform: uppercase;
}
.vcard-status-active  { background: rgba(34,197,94,0.15);  color: #4ade80; border: 1px solid rgba(34,197,94,0.25); }
.vcard-status-frozen  { background: rgba(96,165,250,0.12);  color: #93c5fd; border: 1px solid rgba(96,165,250,0.2); }
.vcard-status-cancelled { background: rgba(239,68,68,0.12); color: #fca5a5; border: 1px solid rgba(239,68,68,0.2); }

/* Purpose / Title label */
.vcard-purpose {
  padding: 0.35rem 1.25rem 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chip row */
.vcard-chip-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1.25rem 0;
}
.vcard-chip-svg { width: 38px; height: 30px; }
.vcard-nfc-svg  { width: 18px; height: 18px; color: rgba(255,255,255,0.3); }

/* Card number */
.vcard-number-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.45rem 1.25rem 0;
  font-family: 'Courier New', 'Courier', monospace;
}
.vcard-dots  { font-size: 1.05rem; letter-spacing: 3px; color: rgba(255,255,255,0.55); }
.vcard-last4 { font-size: 1.05rem; letter-spacing: 3px; color: rgba(255,255,255,0.9); font-weight: 600; }
.vcard-copy-btn {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px; cursor: pointer; padding: 4px 8px;
  color: rgba(255,255,255,0.55); transition: all 0.2s; margin-left: auto;
  display: flex; align-items: center; gap: 4px; font-size: 0.65rem;
  font-family: inherit; letter-spacing: 0.5px;
}
.vcard-copy-btn:hover { color: #f0b90b; border-color: #f0b90b; background: rgba(240,185,11,0.1); }
.vcard-copy-btn.copied { color: #22c55e; border-color: #22c55e; background: rgba(34,197,94,0.1); }

/* Fields row */
.vcard-fields {
  display: flex;
  gap: 1.5rem;
  padding: 0.45rem 1.25rem 0;
  flex: 1;
  align-items: flex-end;
}
.vcard-field { display: flex; flex-direction: column; gap: 0.15rem; }
.vcard-field-label {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
}
.vcard-field-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.82);
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
}

/* Holder name */
.vcard-holder {
  padding: 0.3rem 1.25rem 0;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
}

/* Reveal bar */
.vcard-reveal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.1rem;
  margin-top: 0.4rem;
  background: rgba(255,255,255,0.04);
  border-top: 1px solid rgba(255,255,255,0.07);
  cursor: pointer;
  transition: background 0.2s ease;
  user-select: none;
}
.vcard-reveal-bar:hover { background: rgba(255,255,255,0.07); }
.vcard-reveal-bar:active { background: rgba(255,255,255,0.1); }

.vcard-reveal-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.02em;
}
.vcard-reveal-left svg { color: rgba(255,255,255,0.4); flex-shrink: 0; }

/* Network logo */
.vcard-network-logo { flex-shrink: 0; }
.vcard-network-svg  { height: 22px; width: auto; display: block; }

/* ===== Transactions Section (white card) ===== */
.tx-section {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.25rem;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

/* ===== Transaction Rows ===== */
.tx-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.tx-row:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--border-hover);
}

.tx-row .tx-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.tx-row .tx-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tx-row .tx-icon svg {
  width: 18px;
  height: 18px;
}

.tx-icon.deposit { background: rgba(34,197,94,0.12); color: #22c55e; }
.tx-icon.card_purchase { background: rgba(240,185,11,0.12); color: #f0b90b; }
.tx-icon.card_topup { background: rgba(59,130,246,0.12); color: #3b82f6; }
.tx-icon.debit { background: rgba(239,68,68,0.12); color: #ef4444; }
.tx-icon.default { background: rgba(107,107,128,0.12); color: #6b6b80; }

.tx-row .tx-info {
  min-width: 0;
}

.tx-row .tx-desc {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-row .tx-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.tx-row .tx-right {
  text-align: right;
  flex-shrink: 0;
  margin-left: 1rem;
}

.tx-row .tx-amount {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
}

.tx-row .tx-amount.positive { color: #22c55e; }
.tx-row .tx-amount.negative { color: var(--text-primary); }

.tx-type-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 0.2rem;
}

.tx-type-badge.completed { background: rgba(34,197,94,0.12); color: #22c55e; }
.tx-type-badge.pending { background: rgba(240,185,11,0.12); color: #f0b90b; }
.tx-type-badge.failed { background: rgba(239,68,68,0.12); color: #ef4444; }
.tx-type-badge.waiting { background: rgba(59,130,246,0.12); color: #3b82f6; }

/* ===== Card Activity — Grouped by Card ===== */
.tx-card-group {
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
.tx-card-group:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.tx-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}
.tx-card-header:hover {
  background: rgba(0,0,0,0.02);
}
.tx-card-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.tx-card-mini-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #1a1a2e, #0d0d14);
  color: #f0b90b;
  position: relative;
  overflow: hidden;
}
.tx-card-mini-icon svg {
  width: 20px;
  height: 20px;
}
.tx-card-mini-icon.visa { background: linear-gradient(135deg, #1a1f71, #0d47a1); color: #fff; }
.tx-card-mini-icon.mastercard { background: linear-gradient(135deg, #1a1a2e, #0d0d14); color: #f0b90b; }
.tx-card-details {
  min-width: 0;
}
.tx-card-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-card-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}
.tx-card-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.tx-card-total {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
}
.tx-card-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.tx-card-group.open .tx-card-chevron {
  transform: rotate(180deg);
}
.tx-card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.tx-card-group.open .tx-card-body {
  max-height: 1000px;
}
.tx-card-body-inner {
  padding: 0 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.tx-card-body .tx-row {
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  font-size: 0.88rem;
}
.tx-card-body .tx-row .tx-icon {
  width: 32px;
  height: 32px;
}
.tx-card-body .tx-row .tx-icon svg {
  width: 15px;
  height: 15px;
}
.tx-card-body .tx-row .tx-desc {
  font-size: 0.85rem;
}
.tx-card-body .tx-row .tx-amount {
  font-size: 0.88rem;
}

/* Light theme grouped cards */
.light-theme .tx-card-group {
  background: #fff;
  border-color: rgba(0,0,0,0.06);
}
.light-theme .tx-card-header:hover {
  background: #f8f9fb;
}
.light-theme .tx-card-body .tx-row {
  background: #f8f9fb;
  border: 1px solid rgba(0,0,0,0.04);
}
.light-theme .tx-card-body .tx-row:hover {
  background: #f0f2f5;
}

/* ===== Dashboard Entrance Animations ===== */
@keyframes dash-fade-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Dashboard Section Title ===== */
.dash-section {
  margin-bottom: 2rem;
  animation: dash-fade-in 0.6s ease both;
}

.dash-section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

/* ===== LIGHT THEME — Brand Dashboard Overrides ===== */
.light-theme .modal-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #12121a 55%, #0d0d14 100%);
  color: #fff;
}
.light-theme .modal-header p {
  color: rgba(255,255,255,0.55);
}
.light-theme .modal-header h2 svg {
  stroke: #f0b90b;
}
.light-theme .btn-modal-confirm {
  background: linear-gradient(135deg, #f0b90b, #fcd535, #f0b90b);
  color: #000;
  font-weight: 700;
}
.light-theme .btn-modal-confirm:hover {
  background: linear-gradient(135deg, #d4a00a, #f0b90b, #d4a00a);
  box-shadow: 0 4px 20px rgba(240,185,11,0.35);
}
.light-theme .modal-body .form-input:focus,
.light-theme .modal-body select:focus {
  border-color: rgba(240,185,11,0.5);
  box-shadow: 0 0 0 3px rgba(240,185,11,0.08);
}
.light-theme .tx-row {
  background: #f8f9fb;
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: 10px;
}
.light-theme .tx-row:hover {
  background: #f0f2f5;
  border-color: rgba(37,99,235,0.1);
}
.light-theme .form-input,
.light-theme select {
  background: #f8f9fb;
  border-color: rgba(0, 0, 0, 0.1);
  color: #1a1a2e;
}
.light-theme .form-input::placeholder {
  color: rgba(0, 0, 0, 0.3);
}
.light-theme .form-input:focus,
.light-theme select:focus {
  background: #ffffff;
  border-color: rgba(240,185,11,0.5);
  box-shadow: 0 0 0 3px rgba(240,185,11,0.08);
}

/* ===== Premium Top-Up Modal ===== */
.topup-modal { max-width: 440px; }
.topup-modal .modal-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #12121a 55%, #0d0d14 100%);
  padding: 1.75rem 2rem;
  position: relative;
  overflow: hidden;
}
.topup-modal .modal-header::before {
  content: '';
  position: absolute; top: -40%; right: -20%;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(240,185,11,0.12) 0%, transparent 70%);
  border-radius: 50%;
}
.topup-modal .modal-header h2 {
  font-size: 1.5rem; position: relative;
}
.topup-modal .modal-header h2 svg { stroke: #f0b90b; }
.topup-modal .modal-header p {
  color: rgba(255,255,255,0.5); position: relative;
}

.topup-modal .modal-body { padding: 1.75rem 2rem; }
.topup-modal .modal-body .form-group { margin-bottom: 1.5rem; }
.topup-modal .modal-body .form-group label {
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.6px; color: #8a8aa0; margin-bottom: 0.6rem;
}
.topup-modal .modal-body .form-input,
.topup-modal .modal-body select {
  padding: 0.9rem 1.1rem; font-size: 0.95rem;
  border-radius: 10px; border: 1.5px solid rgba(0,0,0,0.08);
  background: #f8f9fb; transition: all 0.25s ease;
}
.light-theme .topup-modal .modal-body .form-input:focus,
.light-theme .topup-modal .modal-body select:focus {
  border-color: rgba(240,185,11,0.5);
  box-shadow: 0 0 0 4px rgba(240,185,11,0.08);
  background: #fff;
}

/* Fee breakdown card */
.topup-breakdown {
  margin-top: 0.5rem; padding: 1.25rem;
  background: linear-gradient(135deg, #fefcf3 0%, #fffdf7 100%);
  border: 1.5px solid rgba(240,185,11,0.18);
  border-radius: 12px;
  display: none;
}
.topup-breakdown-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.45rem 0;
}
.topup-breakdown-label {
  font-size: 0.85rem; color: #6b6b80;
}
.topup-breakdown-value {
  font-size: 0.85rem; font-weight: 600; color: #1a1a2e;
}
.topup-breakdown-divider {
  border: none; border-top: 1px dashed rgba(240,185,11,0.3);
  margin: 0.35rem 0;
}
.topup-breakdown-total .topup-breakdown-label {
  font-size: 0.95rem; font-weight: 700; color: #1a1a2e;
}
.topup-breakdown-total .topup-breakdown-value {
  font-size: 1.05rem; font-weight: 800; color: #f0b90b;
}

/* Action buttons */
.topup-modal .modal-footer {
  padding: 0 2rem 1.75rem; gap: 0.75rem;
}
.topup-modal .btn-modal-cancel {
  padding: 0.8rem 1.5rem; border-radius: 10px;
  font-size: 0.9rem; font-weight: 500;
}
.topup-modal .btn-modal-confirm {
  padding: 0.8rem 2rem; border-radius: 10px;
  font-size: 0.95rem; font-weight: 700; letter-spacing: 0.3px;
  background: linear-gradient(135deg, #f0b90b, #fcd535, #f0b90b);
  color: #000; border: none;
  box-shadow: 0 2px 12px rgba(240,185,11,0.2);
  display: flex; align-items: center; gap: 0.5rem;
}
.topup-modal .btn-modal-confirm:hover {
  box-shadow: 0 4px 24px rgba(240,185,11,0.4);
  transform: translateY(-1px);
}
.topup-modal .btn-modal-confirm:disabled {
  opacity: 0.6; transform: none; box-shadow: none;
}

@media (max-width: 480px) {
  .topup-modal .modal-header { padding: 1.25rem 1.5rem; }
  .topup-modal .modal-body { padding: 1.25rem 1.5rem; }
  .topup-modal .modal-footer { padding: 0 1.5rem 1.5rem; }
  .topup-modal .btn-modal-confirm { width: 100%; justify-content: center; }
  .topup-modal .btn-modal-cancel { width: 100%; text-align: center; }
  .topup-modal .modal-footer { flex-direction: column-reverse; }
}

/* ===== Processing & Success Screens ===== */
.process-screen {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 3rem 2rem; min-height: 320px;
}

/* 3-step progress bar */
.process-steps {
  display: flex; align-items: center; gap: 0; width: 100%; max-width: 280px;
  margin-bottom: 2rem;
}
.process-step {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #e8e8ef; color: #a0a0b8;
  transition: all 0.5s ease;
}
.process-step.active {
  background: linear-gradient(135deg, #1a1a2e, #2a2a44);
  color: #f0b90b; box-shadow: 0 4px 16px rgba(26,26,46,0.25);
}
.process-step.done {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff; box-shadow: 0 4px 16px rgba(34,197,94,0.3);
}
.process-line {
  flex: 1; height: 3px; background: #e0e0ea; border-radius: 3px; overflow: hidden;
}
.process-line-fill {
  width: 0%; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #1a1a2e, #f0b90b);
  transition: width 0.8s ease;
}
.process-line-fill.filling { width: 100%; }

.process-text {
  font-size: 1rem; font-weight: 500; color: #5a5a72;
  text-align: center;
  animation: processPulse 1.5s ease-in-out infinite;
}
@keyframes processPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Success screen */
.success-state {
  display: flex; flex-direction: column; align-items: center;
  animation: successFadeIn 0.5s ease;
}
@keyframes successFadeIn {
  from { opacity: 0; transform: scale(0.9) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.success-check {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 32px rgba(34,197,94,0.3);
  animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes successPop {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.success-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.5rem; font-weight: 700; color: #1a1a2e;
  margin-bottom: 0.5rem;
}
.success-subtitle {
  font-size: 0.95rem; color: #6b6b80;
  margin-bottom: 2rem; text-align: center;
}
.success-btn {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 2rem; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #f0b90b, #fcd535, #f0b90b);
  color: #000; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; letter-spacing: 0.3px;
  box-shadow: 0 4px 20px rgba(240,185,11,0.3);
  transition: all 0.25s ease;
}
.success-btn:hover {
  box-shadow: 0 6px 28px rgba(240,185,11,0.45);
  transform: translateY(-2px);
}

/* ===== Dashboard Responsive ===== */
@media (max-width: 640px) {
  .dash-greeting-title {
    font-size: 1.3rem;
  }

  .my-balance-amount {
    font-size: 2rem;
  }

  .wallet-card {
    padding: 1.25rem;
  }

  .wallet-card-amount {
    font-size: 1.5rem;
  }

  .cards-section-header {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .cards-section-title {
    font-size: 1.35rem;
  }

  .cards-empty-msg {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .virtual-card {
    min-width: 280px;
    min-height: 180px;
    padding: 1.5rem;
  }

  .dashboard-content {
    padding: 0 1rem 2rem;
  }
}

@media (max-width: 480px) {
  .dash-greeting-title {
    font-size: 1.15rem;
  }

  .my-balance-amount {
    font-size: 1.75rem;
  }

  .wallet-card-amount {
    font-size: 1.35rem;
  }

  .wallet-card-network {
    font-size: 0.8rem;
  }

  .wallet-card-icon svg {
    width: 36px;
    height: 36px;
  }

  .virtual-card {
    min-width: 260px;
  }

  .card-number {
    font-size: 1rem;
  }

  .btn-topup-card,
  .btn-new-card {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
}

/* ===== TELEGRAM SUPPORT WIDGET ===== */

/*
 * When ANY modal overlay is active (.active class added by JS), the tg-widget
 * is a following sibling in the DOM, so the ~ combinator targets it.
 * We hide it completely so it cannot intercept touches on modal buttons
 * (the FAB sits at z-index 9000 — far above the modal overlay at 2000,
 * causing it to swallow taps on Back / Cancel buttons in the lower-left corner).
 */
.modal-overlay.active ~ #tg-widget {
  pointer-events: none !important;
  visibility: hidden !important;
}

.tg-widget {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

/* Floating action button */
.tg-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0088cc;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 136, 204, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tg-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(0, 136, 204, 0.5);
}
.tg-fab svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

/* Chat bubble */
.tg-bubble {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  padding: 1.25rem;
  width: 300px;
  max-width: calc(100vw - 2.5rem);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  position: relative;
}
.tg-bubble.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.tg-bubble-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}
.tg-bubble-close:hover {
  color: #333;
}

.tg-bubble-body {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tg-bubble-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: #0088cc;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tg-bubble-avatar svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.tg-bubble-text strong {
  display: block;
  font-size: 0.95rem;
  color: #1a1a2e;
  margin-bottom: 0.25rem;
}
.tg-bubble-text p {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
  margin: 0;
}

.tg-bubble-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: #0088cc;
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s ease;
}
.tg-bubble-btn:hover {
  background: #006fa6;
}

/* ===== Card Category Selection (Add New Card — Step 1) ===== */
#card-step-1,
#card-step-2 {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.csel-body { padding: 1rem 1.5rem 1.4rem; }

/* Section label above a group */
.csel-section-header {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

/* Centered row for the single premium card */
.csel-premium-row {
  display: flex;
  justify-content: center;
  margin-bottom: 1.1rem;
}

/* Divider between Premium and Ads sections */
.csel-section-sep {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.75rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.csel-section-sep::before,
.csel-section-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Vertical stack for ad cards */
.csel-ad-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Card tile button */
.csel-tile {
  background: none;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 0.75rem 0.7rem 0.6rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.csel-tile:hover,
.csel-tile:focus-visible {
  border-color: #f0b90b;
  box-shadow: 0 0 0 3px rgba(240,185,11,0.13);
  transform: translateY(-2px);
  outline: none;
}
/* Premium tile — full width */
.csel-tile-premium { max-width: 100%; width: 100%; padding-bottom: 0.75rem; }

/* Footer below the card preview */
.csel-tile-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding: 0 0.05rem;
  min-height: 1.4rem;
}
.csel-tile-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
  font-family: 'DM Sans', sans-serif;
}
.csel-tile-soon {
  font-size: 0.6rem;
  font-weight: 700;
  color: #f0b90b;
  background: rgba(240,185,11,0.1);
  border: 1px solid rgba(240,185,11,0.28);
  border-radius: 20px;
  padding: 0.09rem 0.45rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Mini card preview ── */
.csel-card {
  width: 100%;
  aspect-ratio: 1.586;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0.6rem 0.7rem 0.55rem;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.1), inset 0 -1px 0 rgba(0,0,0,0.2);
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
}
.csel-card-wallet {
  background:
    /* shimmer streak */
    linear-gradient(108deg, transparent 22%, rgba(255,255,255,0.04) 40%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 60%, transparent 78%),
    /* subtle diagonal grain */
    repeating-linear-gradient(45deg, transparent, transparent 3px, rgba(255,255,255,0.012) 3px, rgba(255,255,255,0.012) 6px),
    /* rich deep navy base */
    linear-gradient(135deg, #0a1628 0%, #1c3a72 28%, #102a54 52%, #193260 74%, #07111e 100%);
}
.csel-card-ads {
  background:
    /* shimmer streak */
    linear-gradient(108deg, transparent 22%, rgba(255,255,255,0.03) 40%, rgba(255,255,255,0.055) 50%, rgba(255,255,255,0.03) 60%, transparent 78%),
    /* subtle diagonal grain */
    repeating-linear-gradient(45deg, transparent, transparent 3px, rgba(255,255,255,0.01) 3px, rgba(255,255,255,0.01) 6px),
    /* deep teal-black base */
    linear-gradient(135deg, #0c1520 0%, #1c3045 28%, #0d1e30 52%, #182c42 74%, #060d16 100%);
}
.csel-card-visa {
  background:
    /* shimmer streak */
    linear-gradient(108deg, transparent 22%, rgba(255,255,255,0.03) 40%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 60%, transparent 78%),
    /* subtle diagonal grain */
    repeating-linear-gradient(45deg, transparent, transparent 3px, rgba(255,255,255,0.01) 3px, rgba(255,255,255,0.01) 6px),
    /* deep navy-blue base (Visa brand) */
    linear-gradient(135deg, #0a1628 0%, #1a237e 28%, #0d1b5e 52%, #1a2980 74%, #06102a 100%);
}

/* Platform brand name — gold metallic, center of card */
.csel-brand {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #a07828 0%, #d4a83c 22%, #f5d060 42%, #fae88a 50%, #f5d060 58%, #d4a83c 78%, #a07828 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
  margin: 0.15rem 0;
  user-select: none;
}
.csel-tile-premium .csel-brand,
.csel-tile-ad .csel-brand {
  font-size: 0.92rem;
  letter-spacing: 0.36em;
  margin: 0.32rem 0 0.18rem;
}

.csel-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-shrink: 0;
}
.csel-flag  { font-size: 0.85rem; line-height: 1; }
.csel-chip  { width: 22px; height: 17px; flex-shrink: 0; }

/* Apple Pay / Google Pay pill badges */
.csel-pay-badges {
  display: flex;
  gap: 0.3rem;
  flex: 1;
  align-items: center;
  margin: 0.28rem 0;
}
.csel-badge-apple,
.csel-badge-google {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  padding: 0.14rem 0.38rem;
  border-radius: 5px;
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.csel-badge-apple  { background: rgba(255,255,255,0.13); color:#fff; border:1px solid rgba(255,255,255,0.22); }
.csel-badge-google { background: rgba(255,255,255,0.08); color:#fff; border:1px solid rgba(255,255,255,0.14); }

/* Ad platform SVG logo row */
.csel-ad-logos {
  display: flex;
  gap: 0.28rem;
  flex: 1;
  align-items: center;
  margin: 0.28rem 0;
}
.csel-ad-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 3.5px;
  overflow: hidden;
  flex-shrink: 0;
}

.csel-card-number {
  font-size: 0.49rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.65);
  font-family: monospace;
  flex-shrink: 0;
}
.csel-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-shrink: 0;
  margin-top: auto;
}
.csel-card-info { display: flex; flex-direction: column; gap: 0.04rem; }
.csel-holder {
  font-size: 0.39rem;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.csel-expiry {
  font-size: 0.46rem;
  color: rgba(255,255,255,0.68);
  letter-spacing: 0.04em;
}

/* Mastercard overlapping circles */
.csel-mc-logo { display: flex; align-items: center; }
.csel-mc-circle { width: 14px; height: 14px; border-radius: 50%; }
.csel-mc-circle + .csel-mc-circle { margin-left: -6px; opacity: 0.88; }

/* Visa italic text logo */
.csel-network-visa {
  font-family: 'Arial', 'Helvetica', sans-serif;
  font-size: 0.62rem;
  font-weight: 900;
  font-style: italic;
  color: #fff;
  letter-spacing: 0.06em;
  opacity: 0.9;
}

/* ── Card selected info bar (step 2 when bin pre-chosen) ── */
.csel-selected-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(37,99,235,0.06);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
}
.csel-selected-info-text { display: flex; flex-direction: column; gap: 0.1rem; }
.csel-selected-name { font-weight: 600; font-size: 0.9rem; }
.csel-selected-sub  { font-size: 0.75rem; color: var(--text-secondary); }

/* ── Premium card enlarged internals ── */
.csel-tile-premium .csel-flag  { font-size: 1.65rem; }
.csel-tile-premium .csel-chip  { width: 38px; height: 29px; }
.csel-tile-premium .csel-pay-badges { margin: 0.5rem 0 0.3rem; gap: 0.45rem; }
.csel-tile-premium .csel-badge-apple,
.csel-tile-premium .csel-badge-google {
  font-size: 0.72rem;
  padding: 0.24rem 0.75rem;
  gap: 0.32rem;
  border-radius: 7px;
}
.csel-tile-premium .csel-badge-apple svg { width: 12px; height: 15px; }
.csel-tile-premium .csel-badge-google svg { width: 12px; height: 12px; }
.csel-tile-premium .csel-card-number {
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  margin: 0.1rem 0 0.25rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.55;
}
.csel-tile-premium .csel-holder { font-size: 0.56rem; }
.csel-tile-premium .csel-expiry { font-size: 0.68rem; }
.csel-tile-premium .csel-mc-circle { width: 23px; height: 23px; }
.csel-tile-premium .csel-mc-circle + .csel-mc-circle { margin-left: -9px; }

/* Two-column label/value grid for premium card bottom-left */
.csel-prem-info-grid { display: flex; gap: 1.4rem; }

/* ── Ad tile enlarged internals ── */
.csel-tile-ad { max-width: 100%; width: 100%; padding-bottom: 0.75rem; }
.csel-tile-ad .csel-flag  { font-size: 1.65rem; }
.csel-tile-ad .csel-chip  { width: 38px; height: 29px; }
.csel-tile-ad .csel-ad-logos { margin: 0.5rem 0 0.3rem; gap: 0.5rem; }
.csel-tile-ad .csel-ad-logo  { width: 26px; height: 26px; border-radius: 6px; }
.csel-tile-ad .csel-card-number {
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  margin: 0.1rem 0 0.25rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.55;
}
.csel-tile-ad .csel-holder { font-size: 0.56rem; }
.csel-tile-ad .csel-expiry { font-size: 0.68rem; }
.csel-tile-ad .csel-mc-circle { width: 23px; height: 23px; }
.csel-tile-ad .csel-mc-circle + .csel-mc-circle { margin-left: -9px; }
.csel-tile-ad .csel-network-visa { font-size: 1.1rem; }

/* Premium detail section below the dark card */
.csel-premium-detail {
  padding: 0.9rem 0.15rem 0.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.52rem;
  text-align: left;
}
.csel-prem-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.csel-premium-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.0rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.csel-premium-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.csel-prem-badges-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.csel-pbadge-dark {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 20px;
  padding: 0.24rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}
.csel-pbadge-light {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(240,185,11,0.08);
  border: 1px solid rgba(240,185,11,0.25);
  border-radius: 20px;
  padding: 0.24rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #f0b90b;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}

/* Light theme */
.light-theme .csel-tile        { border-color: rgba(0,0,0,0.1); }
.light-theme .csel-tile:hover  { border-color: #f0b90b; }
.light-theme .csel-tile-name   { color: #1a1a2e; }
.light-theme .csel-section-header,
.light-theme .csel-section-sep { color: #4a5568; }
.light-theme .csel-section-sep::before,
.light-theme .csel-section-sep::after { background: rgba(0,0,0,0.1); }
.light-theme .csel-pbadge-dark { background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.12); color: #1a1a2e; }

/* ===== Card Configuration Modal — Step 2 ===== */

/* Dark navy gradient header */
.cconf-header {
  position: relative;
  background: linear-gradient(135deg, #1a1a2e 0%, #12121a 55%, #0a0a0f 100%);
  padding: 1.35rem 1.5rem 1.15rem;
  flex-shrink: 0;
  border-radius: 0;
}
.cconf-header-close {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  background: rgba(255,255,255,0.18);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s;
  touch-action: manipulation;
}
.cconf-header-close:hover { background: rgba(255,255,255,0.3); }
.cconf-header-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.28rem;
  line-height: 1.2;
  padding-right: 2.5rem;
}
.cconf-header-sub {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.82);
  margin-bottom: 0.7rem;
}
.cconf-header-badges {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.cconf-hbadge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.73rem;
  font-weight: 600;
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.28);
  font-family: 'DM Sans', sans-serif;
}
.cconf-hbadge-outline {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.38);
}

/* Scrollable body */
.cconf-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.2rem 1.5rem 1rem;
  display: flex;
  flex-direction: column;
}

/* Section headings */
.cconf-section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.0rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
}
.cconf-section-title + .cconf-network-list { margin-top: 0; }

/* Field groups */
.cconf-field-group { margin-bottom: 1rem; }
.cconf-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.38rem;
}
.cconf-required { color: #ef4444; margin-left: 0.12rem; }
.cconf-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.28rem;
  line-height: 1.45;
}

/* $ prefix wrapper */
.cconf-prefix-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.cconf-prefix {
  position: absolute;
  left: 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  pointer-events: none;
  z-index: 1;
}
.cconf-prefixed { padding-left: 1.75rem !important; }

/* Network radio options */
.cconf-network-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
}
.cconf-network-option {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s;
  background: var(--surface);
  user-select: none;
}
.cconf-network-option:hover { border-color: rgba(37,99,235,0.32); }
.cconf-network-option:has(input:checked) {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}
.cconf-network-option.cconf-net-selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}
.cconf-network-radio-wrap {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.cconf-radio {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.cconf-radio-dot {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.25);
  background: var(--surface);
  transition: border-color 0.18s;
  position: relative;
}
.cconf-radio-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2563eb;
  transition: transform 0.15s ease;
}
.cconf-network-option:has(input:checked) .cconf-radio-dot,
.cconf-network-option.cconf-net-selected .cconf-radio-dot { border-color: #2563eb; }
.cconf-network-option:has(input:checked) .cconf-radio-dot::after,
.cconf-network-option.cconf-net-selected .cconf-radio-dot::after { transform: translate(-50%,-50%) scale(1); }
.cconf-network-info { display: flex; flex-direction: column; gap: 0.15rem; }
.cconf-network-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}
.cconf-network-avail { font-size: 0.77rem; color: var(--text-secondary); }
.cconf-insufficient {
  font-size: 0.74rem;
  color: #ef4444;
  font-weight: 500;
  display: none;
}

/* Coupon section */
.cconf-coupon-section {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.25rem;
}
.cconf-coupon-header {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}
.cconf-coupon-header svg { color: #7c5cbf; flex-shrink: 0; }
.cconf-coupon-row { display: flex; gap: 0.55rem; }
.cconf-coupon-input { flex: 1; }
.cconf-coupon-btn {
  background: rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.cconf-coupon-btn:hover { background: rgba(37,99,235,0.08); color: #2563eb; border-color: rgba(37,99,235,0.3); }

/* Pinned footer */
.cconf-footer {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1.25rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-secondary);
  position: relative;
  z-index: 10;
}
.cconf-cancel-btn {
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.6rem 0.85rem;
  min-height: 44px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.cconf-cancel-btn:hover { color: var(--text-primary); background: rgba(0,0,0,0.04); }
.cconf-create-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, #f0b90b 0%, #fcd535 50%, #f0b90b 100%);
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 0.72rem 1.1rem;
  min-height: 46px;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: opacity 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(240,185,11,0.28);
}
.cconf-create-btn:hover { opacity: 0.92; box-shadow: 0 6px 24px rgba(240,185,11,0.38); }
.cconf-create-btn:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

/* Light theme */
.light-theme .cconf-network-option { background: #fff; border-color: rgba(0,0,0,0.1); }
.light-theme .cconf-network-option:hover { border-color: rgba(37,99,235,0.28); }
.light-theme .cconf-radio-dot { background: #f8f9fb; border-color: rgba(0,0,0,0.2); }
.light-theme .cconf-coupon-section { background: #fff; border-color: rgba(0,0,0,0.1); }
.light-theme .cconf-coupon-btn { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); }
.light-theme .cconf-footer { background: #fff; border-color: rgba(0,0,0,0.08); }

/* ── Order Summary ── */
.cconf-summary {
  margin-top: 1.15rem;
  padding: 1.15rem 1.25rem;
  background: #f8f9fb;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
}
.cconf-summary-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.85rem;
}
.cconf-summary-header svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #2563eb;
}
.cconf-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0;
}
.cconf-summary-row .cconf-sum-label {
  font-size: 0.85rem;
  color: #5a5a72;
}
.cconf-summary-row .cconf-sum-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a1a2e;
}
.cconf-summary-divider {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin: 0.6rem 0;
}
.cconf-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.2rem 0 0;
}
.cconf-summary-total .cconf-sum-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a2e;
}
.cconf-summary-total .cconf-sum-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f0b90b;
  font-family: 'DM Sans', sans-serif;
}

/* ── Address Mode Toggle ── */
.cconf-addr-toggle {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}
.cconf-addr-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.9rem 0.6rem;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  text-align: center;
  user-select: none;
}
.cconf-addr-btn:hover {
  border-color: rgba(240,185,11,0.35);
}
.cconf-addr-btn.cconf-addr-active {
  border-color: #f0b90b;
  box-shadow: 0 0 0 3px rgba(240,185,11,0.12);
  background: rgba(240,185,11,0.04);
}
.cconf-addr-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cconf-addr-icon svg {
  width: 20px;
  height: 20px;
}
.cconf-addr-icon-quick {
  background: linear-gradient(135deg, #f0b90b, #fcd535);
  color: #000;
}
.cconf-addr-icon-custom {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
}
.cconf-addr-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.cconf-addr-desc {
  font-size: 0.73rem;
  color: var(--text-secondary);
  line-height: 1.35;
}
.light-theme .cconf-addr-btn { background: #fff; border-color: rgba(0,0,0,0.1); }
.light-theme .cconf-addr-btn:hover { border-color: rgba(240,185,11,0.35); }
.light-theme .cconf-addr-btn.cconf-addr-active { background: rgba(240,185,11,0.04); border-color: #f0b90b; }

/* ── Custom Address Form ── */
.cconf-custom-addr {
  padding: 1rem 1.15rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1rem;
  background: var(--surface);
}
.cconf-custom-addr-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.cconf-custom-addr-title svg {
  width: 16px;
  height: 16px;
  color: #2563eb;
}
.cconf-addr-row {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.cconf-addr-row .cconf-field-group {
  flex: 1;
  margin-bottom: 0;
}
.cconf-addr-row .cconf-field-group.cconf-addr-small {
  flex: 0 0 35%;
}
.light-theme .cconf-custom-addr { background: #fff; border-color: rgba(0,0,0,0.1); }
@media (max-width: 480px) {
  .cconf-addr-row { flex-direction: column; gap: 0.5rem; }
  .cconf-addr-row .cconf-field-group.cconf-addr-small { flex: 1; }
}

/* ===== CARD DETAIL PANEL ===== */
.card-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: var(--bg-primary);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  overflow-y: auto;
}
.card-detail-overlay.active {
  opacity: 1;
  visibility: visible;
}

.card-detail-panel {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}

.cdp-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  position: sticky;
  top: 0;
  background: rgba(10, 10, 15, 0.95);
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cdp-back-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.75);
  padding: 0.55rem 1rem;
  min-height: 42px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.cdp-back-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.cdp-header-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
}

/* Card display — renders the same .vcard component inside the panel */
.cdp-card-wrap {
  display: flex;
  justify-content: center;
  padding: 1.5rem 0;
}
.cdp-card-wrap .vcard {
  max-width: 400px;
  width: 100%;
}

/* Stats row */
.cdp-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 0 0 1.5rem;
}

.cdp-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cdp-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cdp-stat-icon.balance { background: rgba(34,197,94,0.1); color: #22c55e; }
.cdp-stat-icon.transactions { background: rgba(59,130,246,0.1); color: #3b82f6; }

.cdp-stat-info { flex: 1; min-width: 0; }
.cdp-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}
.cdp-stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 0.15rem;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: -0.02em;
}

.cdp-stat-pct {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  flex-shrink: 0;
}
.cdp-stat-pct.positive { background: rgba(34,197,94,0.1); color: #22c55e; }
.cdp-stat-pct.neutral { background: rgba(59,130,246,0.1); color: #3b82f6; }
.cdp-stat-pct.negative { background: rgba(239,68,68,0.1); color: #ef4444; }

/* Transactions table section */
.cdp-tx-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.cdp-tx-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.cdp-tx-header h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cdp-filter-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  min-height: 38px;
  color: var(--text-muted);
}
.cdp-filter-input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  width: 160px;
  font-family: inherit;
}
.cdp-filter-input::placeholder { color: var(--text-muted); }

/* Table */
.cdp-table-wrap { overflow-x: auto; }

.cdp-tx-table {
  width: 100%;
  border-collapse: collapse;
}
.cdp-tx-table thead th {
  text-align: left;
  padding: 0.75rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.cdp-tx-table tbody td {
  padding: 0.85rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.cdp-tx-table tbody tr:last-child td { border-bottom: none; }
.cdp-tx-table tbody tr:hover { background: var(--bg-card-hover); }

.cdp-tx-merchant { font-weight: 500; color: var(--text-primary); }
.cdp-tx-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.15rem; }
.cdp-tx-date { font-weight: 500; color: var(--text-primary); }
.cdp-tx-time { font-size: 0.75rem; color: var(--text-muted); }
.cdp-tx-amount { font-weight: 600; white-space: nowrap; }
.cdp-tx-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  text-transform: capitalize;
}
.cdp-tx-status.completed, .cdp-tx-status.approved { background: rgba(34,197,94,0.12); color: #22c55e; }
.cdp-tx-status.pending { background: rgba(240,185,11,0.12); color: #f0b90b; }
.cdp-tx-status.failed, .cdp-tx-status.declined { background: rgba(239,68,68,0.12); color: #ef4444; }

/* Pagination */
.cdp-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.cdp-rows-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cdp-page-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  min-height: 32px;
  color: var(--text-primary);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
}
.cdp-page-info { color: var(--text-secondary); }
.cdp-page-btns { display: flex; gap: 0.25rem; }
.cdp-page-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.45rem;
  min-width: 36px;
  min-height: 36px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.cdp-page-btn:hover:not(:disabled) { background: var(--bg-card-hover); color: var(--text-primary); }
.cdp-page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Card clickable hint */
.vcard { cursor: pointer; }

/* Card detail panel — mobile responsive */
@media (max-width: 768px) {
  .card-detail-panel { padding: 0 1rem 2rem; }
  .cdp-card-wrap { padding: 1rem 0; }
  .cdp-card-wrap .vcard { max-width: 100%; }
  .cdp-stats-row { grid-template-columns: 1fr; }
  .cdp-tx-header { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
  .cdp-filter-input { width: 140px; }
  .cdp-pagination { flex-wrap: wrap; gap: 0.75rem; }
  .cdp-stat-card { padding: 1rem; }
  .cdp-stat-value { font-size: 1.1rem; }
  .cdp-header { padding: 1rem 1.25rem; }
}
@media (max-width: 480px) {
  .cdp-stat-pct { display: none; }
  .cdp-filter-input { width: 100px; }
}
