/* ==========================================================================
   NeoPay — Modern SaaS Design System
   ========================================================================== */

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #6366f1;
  --accent: #06b6d4;
  --gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #06b6d4 100%);
  --gradient-soft: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 50%, #ecfeff 100%);

  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-faint: #94a3b8;
  --white: #ffffff;
  --bg: #f8fafc;
  --border: #e2e8f0;

  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.10);
  --shadow-primary: 0 10px 28px rgba(79, 70, 229, 0.28);

  --font-body: 'Inter', -apple-system, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  touch-action: manipulation;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: var(--white);
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(79,70,229,0.34); }

.btn-outline {
  background: var(--white);
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
}
.btn-ghost:hover { color: var(--primary); }

.btn-block { width: 100%; }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.85rem; }
.btn-danger { background: var(--danger-bg); color: var(--danger); }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.75rem;
}

.card-flat {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* ---------- Forms ---------- */
.field { margin-bottom: 1.15rem; }

.label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.45rem;
}

.input, .select, .textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.textarea { resize: vertical; min-height: 90px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.form-alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}
.form-alert-error { background: var(--danger-bg); color: #b91c1c; }
.form-alert-success { background: var(--success-bg); color: #047857; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}
.badge-success { background: var(--success-bg); color: #047857; }
.badge-warning { background: var(--warning-bg); color: #b45309; }
.badge-danger { background: var(--danger-bg); color: #b91c1c; }
.badge-primary { background: #eef2ff; color: var(--primary); }

/* ---------- Public Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  max-width: 1180px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
}

.logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  flex-shrink: 0;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--white);
  cursor: pointer;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--white);
}
.mobile-menu.mobile-menu-open { display: flex; }
.mobile-menu a {
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--ink-soft);
}
.mobile-menu a:hover { background: var(--bg); color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  background: var(--gradient-soft);
  padding: 4rem 0 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: 2.1rem;
  margin-bottom: 1rem;
}

.hero p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-visual {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
}

/* ---------- Sections ---------- */
.section { padding: 3.5rem 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 2.5rem; }
.section-head h2 { font-size: 1.65rem; margin-bottom: 0.6rem; }
.section-head p { color: var(--ink-soft); }

.grid-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.feature-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.feature-card p { color: var(--ink-soft); font-size: 0.9rem; }

.grid-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.method-chip {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 0.75rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.method-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.method-chip-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stats-band {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  text-align: center;
}
.stats-band strong { display: block; font-family: var(--font-display); font-size: 1.6rem; }
.stats-band span { color: #cbd5e1; font-size: 0.82rem; }

.cta-band {
  background: var(--gradient);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--white);
}
.cta-band h2 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.cta-band p { opacity: 0.9; margin-bottom: 1.5rem; }

/* ---------- Footer ---------- */
.footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 { font-size: 0.9rem; margin-bottom: 0.9rem; }
.footer-col a {
  display: block;
  color: var(--ink-soft);
  font-size: 0.88rem;
  padding: 0.35rem 0;
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-faint);
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ---------- Auth Pages ---------- */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}

.auth-visual {
  display: none;
  background: var(--gradient);
  padding: 3rem;
  color: var(--white);
  flex-direction: column;
  justify-content: center;
}

.auth-visual h2 { font-size: 1.7rem; margin-bottom: 1rem; }
.auth-visual p { opacity: 0.9; margin-bottom: 2rem; }

.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.auth-form-box { width: 100%; max-width: 400px; }
.auth-form-box .logo { margin-bottom: 2rem; }
.auth-form-box h1 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.auth-form-box > p { color: var(--ink-soft); margin-bottom: 1.75rem; font-size: 0.92rem; }

.auth-footer-link {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.auth-footer-link a { color: var(--primary); font-weight: 600; }

.check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.check-row input { width: 16px; height: 16px; accent-color: var(--primary); }

.check-row-terms {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ink-soft);
  cursor: pointer;
}
.check-row-terms input {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 0.15rem;
  accent-color: var(--primary);
}
.check-row-terms span { flex: 1; min-width: 0; }
.check-row-terms a { color: var(--primary); font-weight: 600; }

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

/* ---------- Dashboard Shell ---------- */
.dash-shell { display: flex; flex-direction: column; min-height: 100vh; width: 100%; }

.dash-topbar {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.1rem;
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  overflow: hidden;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--white);
  cursor: pointer;
  flex-shrink: 0;
}
.icon-btn-primary { background: var(--gradient); border: none; color: var(--white); }

.topbar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 55;
}
.sidebar-overlay.sidebar-overlay-visible { display: block; }

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 272px;
  max-width: 82vw;
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1.1rem;
  overflow-y: auto;
  z-index: 60;
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 0.25s ease, visibility 0.25s ease;
}
.sidebar.sidebar-open { transform: translateX(0); visibility: visible; }

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding: 0.25rem;
}

.sidebar-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--white);
  cursor: pointer;
}

.sidebar-section {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 1.25rem 0 0.5rem 0.6rem;
}

.sidebar-menu { list-style: none; }
.sidebar-menu li { margin-bottom: 0.2rem; }
.sidebar-menu a, .sidebar-menu button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  width: 100%;
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.sidebar-menu a:hover, .sidebar-menu button:hover { background: var(--bg); color: var(--primary); }
.sidebar-menu a.active { background: #eef2ff; color: var(--primary); font-weight: 600; }

.dash-main { flex: 1; min-width: 0; padding: 1.75rem 1.25rem 3rem; }

.dash-header {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}
.dash-header h1 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.dash-header p { color: var(--ink-soft); font-size: 0.92rem; }

.dash-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.dash-header-actions .btn { flex: 1 1 auto; min-width: 150px; }

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

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
}
.stat-card span.stat-label { display: block; color: var(--ink-soft); font-size: 0.85rem; margin-bottom: 0.5rem; }
.stat-card strong.stat-value { display: block; font-family: var(--font-display); font-size: 1.6rem; margin-bottom: 0.4rem; }
.stat-trend { font-size: 0.82rem; font-weight: 600; }
.stat-trend-up { color: var(--success); }
.stat-trend-down { color: var(--danger); }

.table-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.table-card-head {
  padding: 1.25rem 1.35rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.table-card-head h3 { font-size: 1rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th {
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  padding: 0.85rem 1.35rem;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 0.9rem 1.35rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
tr:last-child td { border-bottom: none; }

/* ---------- Payment Method Select (form) ---------- */
.method-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.method-option {
  cursor: pointer;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 0.75rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.method-option:has(input:checked) {
  border-color: var(--primary);
  background: #eef2ff;
  color: var(--primary);
}

/* ---------- Status Page ---------- */
.status-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}
.status-box { width: 100%; max-width: 440px; text-align: center; }
.status-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}
.status-icon-success { background: var(--success-bg); color: var(--success); }
.status-icon-pending { background: var(--warning-bg); color: var(--warning); }
.status-box h1 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.status-box p { color: var(--ink-soft); margin-bottom: 1.75rem; }
.status-detail {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: left;
  margin-bottom: 1.75rem;
}
.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.status-row:last-child { border-bottom: none; }
.status-row span:first-child { color: var(--ink-soft); }
.status-row span:last-child { font-weight: 600; }
.status-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.status-actions .btn { flex: 1 1 auto; min-width: 140px; }

/* ==========================================================================
   Responsive — tablet & up
   ========================================================================== */
@media (min-width: 640px) {
  .form-row { grid-template-columns: 1fr 1fr; }
  .grid-features { grid-template-columns: repeat(2, 1fr); }
  .grid-methods { grid-template-columns: repeat(3, 1fr); }
  .stats-band { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 860px) {
  .nav-links { display: flex; }
  .nav-menu-btn { display: none; }
  .mobile-menu { display: none !important; }

  .hero-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2.75rem; }

  .grid-features { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }

  .auth-page { grid-template-columns: 1fr 1fr; }
  .auth-visual { display: flex; }

  .dash-topbar { display: none; }
  .dash-shell { flex-direction: row; }
  .sidebar {
    position: sticky;
    top: 0;
    transform: none;
    visibility: visible;
    width: 272px;
    flex-shrink: 0;
    height: 100vh;
  }
  .sidebar-close-btn { display: none; }
  .sidebar-overlay { display: none !important; }
  .dash-main { padding: 2.25rem 2.5rem 3rem; }
  .dash-header { flex-direction: row; align-items: center; justify-content: space-between; }
  .dash-header-actions .btn { flex: none; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1080px) {
  .stats-band { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Modal ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 80;
  padding: 1.25rem;
  overflow-y: auto;
}
.modal-overlay.modal-open { display: flex; align-items: flex-start; justify-content: center; }

.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 640px;
  margin: 1.5rem 0;
  max-height: calc(100vh - 3rem);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header h3 { font-size: 1.1rem; }

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-footer {
  padding: 1.1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* ---------- Upload Box ---------- */
.upload-box {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  background: var(--bg);
}
.upload-box:hover { border-color: var(--primary); background: #eef2ff; }
.upload-box input[type="file"] { display: none; }
.upload-box .upload-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.65rem;
  color: var(--primary);
}
.upload-box p { font-size: 0.85rem; color: var(--ink-soft); margin: 0; }
.upload-box .upload-hint { font-size: 0.78rem; color: var(--ink-faint); margin-top: 0.25rem; }
.upload-preview {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 0.6rem;
}
.upload-preview.upload-preview-visible { display: flex; }
.upload-preview img { height: 40px; max-width: 140px; object-fit: contain; border-radius: 6px; background: var(--bg); }

/* ---------- Merchant List ---------- */
.merchant-row { display: flex; align-items: center; gap: 0.75rem; }
.merchant-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.merchant-logo img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Admin Theme (visual differentiation dari panel merchant) ---------- */
.admin-theme .sidebar { background: #0f172a; border-right: 1px solid #1e293b; }
.admin-theme .sidebar-logo a.logo { color: #fff; }
.admin-theme .sidebar-close-btn { background: #1e293b; border-color: #334155; color: #fff; }
.admin-theme .sidebar-section { color: #64748b; }
.admin-theme .sidebar-menu a, .admin-theme .sidebar-menu button { color: #cbd5e1; }
.admin-theme .sidebar-menu a:hover, .admin-theme .sidebar-menu button:hover { background: #1e293b; color: #fff; }
.admin-theme .sidebar-menu a.active { background: #312e81; color: #c7d2fe; }
.admin-theme .dash-topbar { background: #0f172a; border-bottom: 1px solid #1e293b; }
.admin-theme .dash-topbar .topbar-logo { color: #fff; }
.admin-theme .dash-topbar .icon-btn { background: #1e293b; border-color: #334155; color: #e2e8f0; }
.admin-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: #312e81; color: #c7d2fe; font-size: 0.72rem; font-weight: 700;
  padding: 0.2rem 0.6rem; border-radius: var(--radius-full); text-transform: uppercase; letter-spacing: 0.04em;
}

/* ---------- Toggle Switch ---------- */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 30px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.25s ease;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  height: 24px;
  width: 24px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--gradient);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}
.toggle-switch input:focus-visible + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

/* ---------- Notification Badge (sidebar menu) ---------- */
.nav-notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: auto;
  animation: badgePulse 1.6s ease-in-out infinite;
}
.nav-notif-badge.nav-notif-hidden { display: none; }

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  50% { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
}

/* ---------- Virtual Card (mirip kartu ATM/bank) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1080px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

.virtual-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1.586 / 1;
  border-radius: 20px;
  padding: 1.5rem;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #06b6d4 100%);
  box-shadow: 0 16px 36px rgba(79, 70, 229, 0.28);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.virtual-card.card-inactive {
  background: linear-gradient(135deg, #64748b 0%, #475569 55%, #334155 100%);
  box-shadow: 0 16px 36px rgba(51, 65, 85, 0.25);
}

.virtual-card::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 65%;
  height: 180%;
  background: radial-gradient(circle, rgba(255,255,255,0.16) 0%, transparent 70%);
  pointer-events: none;
}

.virtual-card::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 50%;
  height: 120%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.vc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.vc-chip {
  width: 42px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, #fde68a, #fbbf24);
  position: relative;
  z-index: 1;
}
.vc-chip::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(120, 90, 10, 0.35);
  border-radius: 3px;
}

.vc-brand-logo {
  height: 24px;
  max-width: 110px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.vc-brand-fallback {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
}

.vc-number {
  font-family: 'Courier New', monospace;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  font-weight: 600;
  position: relative;
  z-index: 1;
  word-break: break-all;
}

.vc-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  gap: 0.75rem;
}

.vc-holder-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
  margin-bottom: 0.2rem;
}
.vc-holder-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.vc-status {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(4px);
}

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* ---------- Badge "Live" (tampil kalau KYC disetujui) ---------- */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--success-bg);
  color: #047857;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.5rem 0.6rem;
}
.live-badge .live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  animation: liveBlink 1.2s ease-in-out infinite;
}
@keyframes liveBlink {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  50% { opacity: 0.4; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
}
