/* ═══════════════════════════════════════════════════════
   فكة (Fakka) — Liquid Glass Design System v2
   3D Glassmorphism · Bento Grid · RTL-first
   ═══════════════════════════════════════════════════════ */

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

/* ── 1. CSS Custom Properties ── */
:root {
  /* Primary Brand (Gold) */
  --primary:        #D4AF37;
  --primary-dark:   #B5952F;
  --primary-light:  #F2D574;
  --primary-glow:   rgba(212, 175, 55, 0.35);

  /* Financial Semantic */
  --success:        #00C48C;
  --success-bg:     rgba(0, 196, 140, 0.12);
  --danger:         #FF4757;
  --danger-bg:      rgba(255, 71, 87, 0.12);
  --warning:        #FFB84D;
  --warning-bg:     rgba(255, 184, 77, 0.12);

  /* Typography */
  --font-body:      'Cairo', sans-serif;
  --font-mono:      'Inter', sans-serif;

  /* Spacing Scale (4px base) */
  --sp-1: 0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.25rem; --sp-6: 1.5rem; --sp-8: 2rem; --sp-10: 2.5rem;
  --sp-12: 3rem;   --sp-16: 4rem;  --sp-20: 5rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50%;

  /* Glass Properties */
  --glass-blur: 25px;
  --glass-saturate: 180%;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --transition-slow: 450ms cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* Z-Index Scale */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 500;
  --z-toast: 700;
  --z-overlay: 900;
}

/* ── 2. Dark Theme (default) ── */
[data-theme="dark"] {
  --bg-primary:     #08080a;
  --bg-secondary:   #0a0a0c;
  --bg-tertiary:    #111113;
  --bg-elevated:    #18181b;

  --text-primary:   #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted:     #64748B;
  --text-inverse:   #08080a;

  --glass-bg:       rgba(15, 15, 18, 0.6);
  --glass-border:   rgba(255, 255, 255, 0.04);
  --glass-hover:    rgba(255, 255, 255, 0.06);
  --glass-active:   rgba(255, 255, 255, 0.08);
  --glass-shadow:   0 40px 80px rgba(0, 0, 0, 0.8);

  --input-bg:       rgba(255, 255, 255, 0.02);
  --input-border:   rgba(255, 255, 255, 0.06);
  --input-focus:    rgba(212, 175, 55, 0.30);

  --divider:        rgba(255, 255, 255, 0.04);
  --shadow-color:   rgba(0, 0, 0, 0.80);
  --overlay-bg:     rgba(0, 0, 0, 0.75);
  
  --app-bg-image:   url('/assets/bg/dark_glow.png');
}

/* ── 3. Light Theme (Luxury) ── */
[data-theme="light"] {
  --bg-primary:     #f8fafc;
  --bg-secondary:   #f1f5f9;
  --bg-tertiary:    #e2e8f0;
  --bg-elevated:    #ffffff;

  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #64748b;
  --text-inverse:   #f8fafc;

  --glass-bg:       rgba(255, 255, 255, 0.7);
  --glass-border:   rgba(0, 0, 0, 0.05);
  --glass-hover:    rgba(255, 255, 255, 0.8);
  --glass-active:   rgba(255, 255, 255, 0.9);
  --glass-shadow:   0 20px 40px rgba(0, 0, 0, 0.08);

  --input-bg:       rgba(255, 255, 255, 0.6);
  --input-border:   rgba(0, 0, 0, 0.1);
  --input-focus:    rgba(212, 175, 55, 0.4);

  --divider:        rgba(0, 0, 0, 0.06);
  --shadow-color:   rgba(0, 0, 0, 0.15);
  --overlay-bg:     rgba(255, 255, 255, 0.8);
  
  --app-bg-image:   url('/assets/bg/light_glow.png');
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 500;
  background: var(--bg-primary);
  color: var(--text-primary);
  direction: rtl;
  min-height: 100dvh;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition-slow), color var(--transition-fast);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  perspective: 1200px;
}

/* Animated gradient mesh background */
@keyframes meshDrift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

[data-theme="dark"] body {
  background-color: var(--bg-primary);
  background-image: var(--app-bg-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

[data-theme="light"] body {
  background-color: var(--bg-primary);
  background-image: var(--app-bg-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); }

img { max-width: 100%; height: auto; display: block; }

/* ── 5. Layout Containers ── */
.app-container {
  width: 100%;
  min-height: 100dvh;
  position: relative;
  background: transparent;
  display: flex;
  flex-direction: column;
}

/* Content wrapper (holds pages) */
.app-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page {
  padding: var(--sp-6);
  padding-bottom: calc(var(--sp-16) + env(safe-area-inset-bottom, 0px));
  min-height: 100dvh;
  display: none;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.page.active {
  display: flex;
  flex-direction: column;
  animation: pageIn var(--transition-base) ease-out;
}

/* ── 6. Glass Components ── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  padding: var(--sp-6);
  box-shadow: 0 40px 80px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  background: var(--glass-hover);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 44px 88px rgba(0,0,0,0.85), inset 0 1px 0 rgba(255,255,255,0.06);
}

.glass-card-flat {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
}

/* ── 6b. Lucide Icon System ── */
/* Splash logo */
.splash-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px; height: 96px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 12px 40px var(--primary-glow);
  animation: scaleIn 0.6s ease-out;
}
.icon-splash { width: 52px; height: 52px; color: #fff; stroke-width: 1.5; }

/* Onboarding illustration icon */
.onboarding-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--primary-glow);
  border: 2px solid rgba(212,175,55,0.25);
  margin: 0 auto;
}
.icon-onboarding { width: 60px; height: 60px; color: var(--primary); stroke-width: 1.5; }

/* Auth logo */
.auth-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 8px 24px var(--primary-glow);
  margin: 0 auto;
}
.icon-auth-logo { width: 36px; height: 36px; color: #fff; stroke-width: 1.5; }

/* Generic page icon (PIN, lock, KYC…) */
.page-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--primary-glow);
  border: 2px solid rgba(212,175,55,0.20);
  margin: 0 auto;
}
.icon-page { width: 40px; height: 40px; color: var(--primary); stroke-width: 1.5; }

/* Quick-action button icon */
.quick-action-btn .icon svg,
.quick-action-btn .icon i {
  width: 22px; height: 22px;
  color: var(--primary);
  stroke-width: 2;
}
.quick-action-btn .icon { display: flex; align-items: center; justify-content: center; }

/* Header icon button (bell, theme toggle) */
.icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.icon-btn:hover { background: var(--glass-hover); color: var(--primary); border-color: var(--primary); }
.icon-btn svg { width: 20px; height: 20px; stroke-width: 2; }

/* Transaction status icon */
.status-icon-wrap {
  width: 96px; height: 96px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--sp-4);
}
.status-icon-wrap.success { background: var(--success-bg); }
.status-icon-wrap.error   { background: var(--danger-bg); }
.status-icon-wrap svg { width: 52px; height: 52px; stroke-width: 1.5; }

/* Nav icon sizing */
.nav-icon svg, .nav-icon i {
  width: 22px; height: 22px;
  stroke-width: 2;
  display: block;
}
.nav-icon { display: flex; align-items: center; justify-content: center; }

/* Back button — replace arrow text with icon */
.page-header .back-btn { font-size: 0; }
.page-header .back-btn svg { width: 20px; height: 20px; stroke-width: 2; color: var(--text-primary); }


/* ── 7. Inputs ── */
.glass-input {
  width: 100%;
  padding: var(--sp-4);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 400;
  outline: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  direction: rtl;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
}

.glass-input:focus {
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.2), 0 0 20px rgba(212, 175, 55, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.glass-input::placeholder {
  color: rgba(255, 255, 255, 0.15);
  font-weight: 400;
}

.glass-input.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.15);
}

/* Legacy input-group */
.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.input-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Floating Label Inputs */
.input-floating {
  position: relative;
  width: 100%;
}
.input-floating input {
  padding: 1.25rem 1rem 0.5rem 1rem;
}
.input-floating label {
  position: absolute;
  top: 50%;
  right: 1rem; /* RTL */
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
  transition: all var(--transition-fast);
  transform-origin: right center;
}
.input-floating input:focus ~ label,
.input-floating input:not(:placeholder-shown) ~ label {
  top: 0.5rem;
  transform: translateY(0) scale(0.75);
  color: var(--primary);
  font-weight: 600;
}
.input-floating input:not(:focus):not(:placeholder-shown) ~ label {
  color: var(--text-secondary);
}
.input-floating .eye-btn {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  z-index: 2;
  transition: color var(--transition-fast);
}
.input-floating .eye-btn:hover { color: var(--primary); }

.input-error {
  font-size: 0.75rem;
  color: var(--danger);
  min-height: 1rem;
  margin-top: 4px;
}

/* ── 8. Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-6);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  width: 100%;
  transform: translateZ(0);
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:active { transform: scale(0.97) translateY(2px); }
.btn:active::after { opacity: 1; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #08080a;
  font-weight: 700;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3), inset 0 2px 5px rgba(255,255,255,0.2);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5), inset 0 2px 5px rgba(255,255,255,0.2);
}

.btn-ghost {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
}

.btn-ghost:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.btn-danger {
  background: var(--danger);
  color: #FFFFFF;
}

.btn-sm { padding: var(--sp-2) var(--sp-4); font-size: 0.875rem; }

/* ── 9. Typography Helpers ── */
.text-xl { font-size: 1.5rem; font-weight: 700; }
.text-lg { font-size: 1.25rem; font-weight: 600; }
.text-md { font-size: 1rem; font-weight: 500; }
.text-sm { font-size: 0.875rem; font-weight: 500; }
.text-xs { font-size: 0.75rem; font-weight: 500; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-center { text-align: center; }
.text-money { font-family: var(--font-mono); font-weight: 700; letter-spacing: -0.02em; }

/* ── 10. Balance Card (Home) ── */
.balance-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-xl);
  padding: var(--sp-8);
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -40%; right: -20%;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.balance-card .balance-amount {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.balance-card .balance-label {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* ── 11. Quick Actions ── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-4);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.75rem;
  font-family: var(--font-body);
}

.quick-action-btn:hover {
  background: var(--glass-hover);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.quick-action-btn .icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-glow);
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
}

/* ── 12. Transaction Item ── */
.tx-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.tx-item:hover { background: var(--glass-hover); }

.tx-item .tx-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.tx-item .tx-icon svg { width: 20px; height: 20px; stroke-width: 2; }
.tx-item .tx-icon.income { background: var(--success-bg); color: var(--success); }
.tx-item .tx-icon.expense { background: var(--danger-bg); color: var(--danger); }

.tx-item .tx-info { flex: 1; min-width: 0; }
.tx-item .tx-info .tx-name { font-weight: 600; font-size: 0.9375rem; }
.tx-item .tx-info .tx-date { font-size: 0.75rem; color: var(--text-muted); }

.tx-item .tx-amount { text-align: left; font-family: var(--font-mono); font-weight: 600; }
.tx-item .tx-amount.positive { color: var(--success); }
.tx-item .tx-amount.negative { color: var(--danger); }

/* ── 13. Bottom Navigation ── */
/* Moved to unified block at end of file */

/* ── 14. Section Headers ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}

.section-header h2 { font-size: 1.125rem; font-weight: 700; }
.section-header .see-all { font-size: 0.8125rem; color: var(--primary); cursor: pointer; }

/* ── 15. OTP / PIN Input ── */
.pin-input-group {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  direction: ltr;
}

.pin-digit {
  width: 52px; height: 60px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  caret-color: var(--primary);
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
}

.pin-digit:focus {
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.2), 0 0 20px rgba(212, 175, 55, 0.1);
}

.pin-digit.filled { border-color: rgba(212, 175, 55, 0.4); }

/* ── 15b. Form Utilities ── */
.upload-card {
  background: var(--glass-bg);
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.upload-card:hover {
  background: var(--glass-hover);
  border-color: var(--primary);
}
.pwd-toggle {
  background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px;
}
.pwd-toggle:hover { color: var(--text-primary); }

/* ── 16. Status Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }

/* ── 17. Page Header ── */
.page-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) 0;
}

.page-header .back-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1.2rem;
  transition: all var(--transition-fast);
}

.page-header .back-btn:hover { background: var(--glass-hover); }
.page-header h1 { font-size: 1.25rem; font-weight: 700; flex: 1; }

/* ── 18. Theme Toggle ── */
.theme-toggle {
  width: 44px; height: 24px;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  position: relative;
  transition: background var(--transition-fast);
}

.theme-toggle::after {
  content: '';
  position: absolute;
  top: 2px; right: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--primary);
  transition: transform var(--transition-base);
}

[data-theme="light"] .theme-toggle::after {
  transform: translateX(-20px);
}

/* ── 19. Loading Skeleton ── */
.skeleton {
  background: linear-gradient(90deg, var(--glass-bg) 25%, var(--glass-hover) 50%, var(--glass-bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* ── 20. Toast Notification ── */
.toast {
  position: fixed;
  top: var(--sp-6);
  left: 50%; transform: translateX(-50%) translateY(-100%);
  max-width: 380px; width: calc(100% - var(--sp-8));
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: var(--z-toast);
  transition: transform var(--transition-base);
  backdrop-filter: blur(12px);
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast-success { background: var(--success); color: #fff; }
.toast-error { background: var(--danger); color: #fff; }

/* ── 21. Utility Classes ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.w-full { width: 100%; }
.flex-1 { flex: 1; }
.hidden { display: none !important; }

/* ── 22. Animations ── */
@keyframes pageIn {
  from { opacity: 0; transform: scale(0.98) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes successPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes checkmark {
  0% { stroke-dashoffset: 100; }
  100% { stroke-dashoffset: 0; }
}

/* ── 23. Responsive Breakpoints ── */

/* ── Tablet (768px+) ── */
@media (min-width: 768px) {
  /* Removed Desktop Sidebar CSS as requested */
  
  .app-container {
    flex-direction: column;
  }

  .page {
    margin-right: auto;
    margin-left: auto;
    max-width: 600px;
    padding: var(--sp-8) var(--sp-6);
    padding-bottom: 120px; /* offset for bottom floating nav */
  }

  .page-header-sticky {
    margin-right: calc(-1 * var(--sp-6));
    margin-left: calc(-1 * var(--sp-6));
    padding-right: var(--sp-6);
    padding-left: var(--sp-6);
  }

  #page-onboarding, #page-splash, #page-otp, #page-set-pin, #page-lock {
    justify-content: center;
    align-items: center;
  }
}

/* ── Wide Desktop (1440px+) ── */
@media (min-width: 1440px) {
  .page {
    max-width: 800px;
  }
}

/* ── Ultra-Wide (1920px+) ── */
@media (min-width: 1920px) {
  .page {
    max-width: 1000px;
    padding: var(--sp-12) var(--sp-20);
    padding-bottom: 120px;
  }
  .quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-5);
  }
  .balance-card-premium {
    max-width: 720px;
  }
}

/* ══════════════════════════════════════
   iOS 2026 Liquid Glass Extensions
   ══════════════════════════════════════ */

/* ── Splash ── */
.splash-logo-wrap {
  width: 100px; height: 100px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--sp-6);
}
.splash-logo-img {
  width: 64px; height: 64px; object-fit: contain;
  position: relative; z-index: 2;
  filter: drop-shadow(0 4px 20px var(--primary-glow));
}
.splash-ring {
  position: absolute; inset: 0;
  border: 2px solid var(--primary);
  border-radius: 50%;
  animation: splashRing 1.5s ease-in-out infinite;
  opacity: .4;
}
@keyframes splashRing {
  0%, 100% { transform: scale(1); opacity: .4; }
  50% { transform: scale(1.15); opacity: .1; }
}
.splash-title {
  font-size: 2rem; font-weight: 700;
  color: var(--primary);
  letter-spacing: .02em;
}
.splash-subtitle {
  font-size: .9rem; color: var(--text-muted);
  margin-top: var(--sp-1);
}
.splash-loader {
  width: 120px; height: 3px;
  background: var(--glass-border);
  border-radius: 2px;
  margin: var(--sp-6) auto 0;
  overflow: hidden;
}
.splash-loader-bar {
  width: 40%; height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 2px;
  animation: splashLoad 1.5s ease-in-out infinite;
}
@keyframes splashLoad {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ── Onboarding ── */
.onboarding-container {
  width: 100%;
  display: flex; flex-direction: column;
  min-height: 100%; padding: var(--sp-10) var(--sp-6) var(--sp-8);
  gap: var(--sp-6);
  align-items: center;
  justify-content: center;
  max-width: 480px;
  margin: 0 auto;
}
.onboarding-slides {
  position: relative;
  width: 100%;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.onboarding-slide {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: var(--sp-5); text-align: center;
  padding: var(--sp-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s, transform .4s cubic-bezier(.4,0,.2,1);
  width: 100%;
  transform: translateX(-20px);
}
.onboarding-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}
.onboarding-icon-glass {
  width: 96px; height: 96px;
  border-radius: 28px;
  background: rgba(15, 15, 18, 0.6);
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 40px 80px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.onboarding-icon-glass:hover {
  transform: scale(1.05) rotateZ(-2deg);
}
.onboarding-title { font-size: 1.5rem; font-weight: 700; }
.onboarding-desc { font-size: .95rem; color: var(--text-secondary); line-height: 1.8; max-width: 400px; font-weight: 500; }
.onboarding-dots {
  display: flex; justify-content: center; gap: var(--sp-2);
}
.onboarding-dots .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--glass-border);
  transition: all .3s;
}
.onboarding-dots .dot.active {
  width: 24px; border-radius: 4px;
  background: var(--primary);
}
.onboarding-actions {
  display: flex; flex-direction: column; gap: 0;
}

/* ── Auth Page Layout ── */
.auth-page-inner {
  padding: var(--sp-10) var(--sp-6) var(--sp-8);
  display: flex; flex-direction: column;
  gap: var(--sp-6);
  min-height: 100%;
  justify-content: center;
}
.auth-logo-glass {
  width: 72px; height: 72px;
  border-radius: 20px;
  background: rgba(15, 15, 18, 0.6);
  backdrop-filter: blur(60px); -webkit-backdrop-filter: blur(60px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--sp-4);
  box-shadow: 0 40px 80px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.05);
}
.auth-title {
  font-size: 1.5rem; font-weight: 700;
  margin-bottom: var(--sp-1);
  color: #fff;
  letter-spacing: -1px;
}
.auth-subtitle {
  font-size: .9rem; color: rgba(255,255,255,0.5);
}
.auth-divider {
  display: flex; align-items: center; gap: var(--sp-3);
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--divider);
}
.auth-divider span {
  font-size: .82rem; color: var(--text-muted); white-space: nowrap;
}

/* ── Sticky Page Header ── */
.page-header-sticky {
  position: sticky; top: 0; z-index: 20;
  background: rgba(8, 8, 10, 0.85);
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  padding: var(--sp-4) var(--sp-5);
  display: flex; align-items: center; gap: var(--sp-3);
  margin: calc(var(--sp-6) * -1) calc(var(--sp-6) * -1) var(--sp-6) calc(var(--sp-6) * -1);
}
.page-header-sticky h1 {
  font-size: 1.1rem; font-weight: 700; margin: 0;
}

/* ── Section Badge ── */
.section-badge {
  font-size: .75rem; font-weight: 700;
  color: var(--primary);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
}

/* ── Upload Zone ── */
.upload-zone {
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  text-align: center;
  cursor: pointer;
  transition: all .3s;
}
.upload-zone:hover {
  border-color: var(--primary);
  background: var(--glass-hover);
}
.upload-preview-container {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}
.upload-preview-container img {
  max-height: 130px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

/* ── Home Header ── */
.home-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) 0;
}
.home-avatar-wrap {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: rgba(15, 15, 18, 0.6);
  backdrop-filter: blur(60px); -webkit-backdrop-filter: blur(60px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex; align-items: center; justify-content: center;
}
.icon-btn-glass {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(15, 15, 18, 0.6);
  backdrop-filter: blur(60px); -webkit-backdrop-filter: blur(60px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.icon-btn-glass:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(212, 175, 55, 0.3);
}
.icon-btn-glass i, .icon-btn-glass svg {
  width: 20px; height: 20px;
}

/* ── Premium Balance Card ── */
.balance-card-premium {
  position: relative;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
  border-radius: var(--radius-xl);
  padding: var(--sp-8) var(--sp-6);
  color: #fff;
  text-align: center;
  margin: var(--sp-4) auto 0;
  overflow: hidden;
  box-shadow: 0 12px 48px var(--primary-glow), 0 4px 16px rgba(0,0,0,0.2);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.balance-card-premium:hover {
  transform: translateY(-2px) scale(1.005);
  box-shadow: 0 16px 56px var(--primary-glow), 0 6px 20px rgba(0,0,0,0.25);
}
.balance-card-premium .balance-card-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.18) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(255,255,255,.06) 0%, transparent 40%);
  pointer-events: none;
}
.balance-card-premium .balance-label {
  font-size: .85rem; opacity: .85;
  margin-bottom: var(--sp-2);
  position: relative;
}
.balance-card-premium .balance-amount {
  font-size: 2.5rem; font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: .02em;
  position: relative;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.balance-card-premium .balance-currency {
  font-size: .8rem; opacity: .7;
  margin-top: var(--sp-1);
  position: relative;
}

/* ── Quick Actions Grid (Liquid Glass) ── */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}
.quick-action-glass {
  display: flex; flex-direction: column;
  align-items: center; gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-2);
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-primary);
  font-size: .8rem; font-weight: 600;
}
.quick-action-glass:hover {
  background: var(--glass-hover);
  border-color: rgba(212, 175, 55, 0.3);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 28px rgba(212, 175, 55, 0.15), 0 4px 12px rgba(0,0,0,0.15);
}
.quick-action-glass .qa-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--primary-glow);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
}
.quick-action-glass .qa-icon i, .quick-action-glass .qa-icon svg {
  width: 20px; height: 20px;
}

/* ── App Navigation — Unified Floating Bottom Bar ── */
.app-nav {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 600px;
  z-index: var(--z-sticky);
  padding: 12px 24px;
  background: rgba(15, 15, 18, 0.6);
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 40px 80px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.05);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s;
}
.app-nav.hidden { 
  transform: translate(-50%, 150%);
  opacity: 0;
  pointer-events: none;
}

/* Brand */
.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.nav-brand-logo {
  width: 32px; height: 32px;
  object-fit: contain;
}
.nav-brand-text {
  font-size: 1.1rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: none;
}
@media (min-width: 480px) {
  .nav-brand-text { display: block; }
}

/* Nav items container */
.nav-items {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-grow: 1;
}

/* Nav item (base) */
.nav-item {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  background: none; border: none;
  border-radius: 50px;
  width: 50px; height: 50px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-body);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.nav-item .nav-icon {
  display: flex; align-items: center; justify-content: center;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(6px);
}
.nav-item .nav-icon i, .nav-item .nav-icon svg {
  width: 24px; height: 24px;
}

.nav-label {
  font-size: 0.65rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: absolute;
  bottom: 6px;
}

/* Active State */
.nav-item.active {
  color: var(--primary);
  background: rgba(255,255,255,0.03);
}
.nav-item.active .nav-icon {
  transform: translateY(-8px);
  color: var(--primary);
  filter: drop-shadow(0 2px 8px var(--primary-glow));
}
.nav-item.active .nav-label {
  opacity: 1;
  transform: translateY(0);
}

[data-theme="light"] .app-nav {
  background: rgba(8, 8, 10, 0.85);
  border-color: rgba(255, 255, 255, 0.04);
  box-shadow: 0 40px 80px rgba(0,0,0,.8);
}

/* ── Extra Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ══════════════════════════════════════
   Bento Grid Layout
   ══════════════════════════════════════ */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  margin-top: var(--sp-4);
}

.bento-item {
  animation: bentoIn var(--transition-slow) ease-out both;
}

.bento-item:nth-child(1) { animation-delay: 0ms; }
.bento-item:nth-child(2) { animation-delay: 80ms; }
.bento-item:nth-child(3) { animation-delay: 160ms; }
.bento-item:nth-child(4) { animation-delay: 240ms; }

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

/* Tablet: 2-column bento */
@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-full {
    grid-column: 1 / -1;
  }
}

/* Desktop: 2-column bento (keeps layout symmetrical since there are 2 main widgets) */
@media (min-width: 1280px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-6);
  }
  .bento-full {
    grid-column: 1 / -1;
  }
}

/* ══════════════════════════════════════
   Glass Shine Effect (hover)
   ══════════════════════════════════════ */
.glass-shine {
  position: relative;
  overflow: hidden;
}
.glass-shine::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255,255,255,0.06) 45%,
    rgba(255,255,255,0.12) 50%,
    rgba(255,255,255,0.06) 55%,
    transparent 60%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  pointer-events: none;
}
.glass-shine:hover::after {
  transform: translateX(50%);
}

/* ══════════════════════════════════════
   Splash logo fix
   ══════════════════════════════════════ */
.splash-logo-img {
  width: 52px; height: 52px;
  position: relative; z-index: 2;
  filter: drop-shadow(0 4px 20px var(--primary-glow));
}

/* ══════════════════════════════════════
   Auth Logo Glass — deeper effect
   ══════════════════════════════════════ */
.auth-logo-glass {
  width: 76px; height: 76px;
  border-radius: 22px;
  background: rgba(15, 15, 18, 0.6);
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--sp-4);
  box-shadow: 0 40px 80px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.auth-logo-glass:hover {
  transform: scale(1.06) rotateZ(-3deg);
}

/* ══════════════════════════════════════
   TX-DETAIL — Ultra Premium Receipt UI
   ══════════════════════════════════════ */

/* Page body */
#page-tx-detail {
  padding-bottom: calc(var(--sp-8) + env(safe-area-inset-bottom, 0px));
}

/* ── Header ── */
.txd-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  background: var(--glass-bg);
  backdrop-filter: blur(30px) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(30px) saturate(var(--glass-saturate));
  border-bottom: 1px solid var(--glass-border);
}
.txd-header-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}
.txd-back-btn,
.txd-share-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
}
.txd-back-btn:hover, .txd-share-btn:hover {
  background: var(--glass-hover);
  border-color: var(--primary);
  transform: scale(1.08);
}

/* ── Body container ── */
.txd-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-5) var(--sp-6);
  max-width: 540px;
  margin: 0 auto;
  width: 100%;
}

/* ── Entrance animation ── */
@keyframes txdEnter {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}
.txd-enter {
  animation: txdEnter 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

/* ── Receipt Hero Card ── */
.txd-receipt {
  position: relative;
  border-radius: var(--radius-xl);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
  padding: var(--sp-8) var(--sp-6) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
}

/* Radial orb glow behind icon */
.txd-orb {
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 200px; height: 200px;
  border-radius: 50%;
  opacity: 0.12;
  filter: blur(40px);
  pointer-events: none;
  animation: txdOrbPulse 4s ease-in-out infinite;
}
@keyframes txdOrbPulse {
  0%, 100% { opacity: 0.10; transform: translateX(-50%) scale(1);   }
  50%       { opacity: 0.18; transform: translateX(-50%) scale(1.15);}
}

/* Icon circle */
.txd-icon-wrap {
  position: relative;
  z-index: 1;
  width: 72px; height: 72px;
  border-radius: 22px;
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  box-shadow: 0 0 0 6px rgba(212,175,55,0.06),
              0 8px 32px rgba(0,0,0,0.12);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform var(--transition-base);
}
.txd-icon-wrap:hover { transform: scale(1.06) rotate(-4deg); }

/* Type label */
.txd-type-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: var(--sp-1);
}

/* Amount hero */
.txd-amount-hero {
  display: flex;
  align-items: baseline;
  gap: var(--sp-1);
  position: relative;
  z-index: 1;
}
.txd-sign {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
}
.txd-amt-value {
  font-size: 3rem;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1;
  letter-spacing: -0.02em;
}
.txd-amt-currency {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  align-self: flex-end;
  margin-bottom: 6px;
}
.txd-amt-in  { color: var(--success); }
.txd-amt-out { color: var(--danger);  }

/* Status badge */
.txd-status-wrap { margin-bottom: var(--sp-4); }
.txd-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.txd-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: txdDotPulse 2s ease-in-out infinite;
}
@keyframes txdDotPulse {
  0%, 100% { opacity: 1; transform: scale(1);    }
  50%       { opacity: 0.5; transform: scale(0.7); }
}
.txd-badge-success { background: rgba(34,197,94,0.15); color: var(--success);  border: 1px solid rgba(34,197,94,0.3);  }
.txd-badge-warn    { background: rgba(251,191,36,0.15); color: #f59e0b;        border: 1px solid rgba(251,191,36,0.3);  }
.txd-badge-danger  { background: rgba(239,68,68,0.15);  color: var(--danger);  border: 1px solid rgba(239,68,68,0.3);   }
.txd-badge-info    { background: rgba(129,140,248,0.15);color: #818cf8;        border: 1px solid rgba(129,140,248,0.3); }

/* Receipt tear line */
.txd-tear {
  width: calc(100% + 2px);
  height: 24px;
  margin: 0 -1px;
  background: var(--bg-primary);
  border-top: 2px dashed var(--glass-border);
  position: relative;
}
.txd-tear::before,
.txd-tear::after {
  content: '';
  position: absolute;
  top: -12px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg-primary);
}
.txd-tear::before { left: -13px; }
.txd-tear::after  { right: -13px; }

/* ── Details Panel ── */
.txd-details {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  border-radius: var(--radius-lg);
}
.txd-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--sp-3);
}

/* Row */
.txd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--divider);
  gap: var(--sp-3);
}
.txd-row:last-child { border-bottom: none; }
.txd-row-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}
.txd-row-value {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 600;
  text-align: left;
  word-break: break-all;
}
.txd-mono { font-family: var(--font-mono); font-size: 0.82rem; }

/* Reference badge */
.txd-ref-badge {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 2px var(--sp-2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--primary);
}

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

/* Total row */
.txd-total-row { padding-top: var(--sp-3); }
.txd-total-val {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary) !important;
}

/* ── Action Buttons ── */
.txd-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
.txd-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--primary);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #111;
  transition: all var(--transition-base);
  box-shadow: 0 4px 16px var(--primary-glow);
}
.txd-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-glow);
}
.txd-action-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border-color: var(--glass-border);
  box-shadow: none;
}
.txd-action-secondary:hover {
  background: var(--glass-hover);
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(212,175,55,0.1);
}

/* ── Skeleton Loader ── */
.txd-skeleton {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-8) var(--sp-5);
}
.skeleton-orb {
  width: 72px; height: 72px;
  border-radius: 22px;
  background: var(--bg-tertiary);
  animation: skeletonShimmer 1.5s ease-in-out infinite;
}
.skeleton-line {
  height: 14px;
  border-radius: 999px;
  background: var(--bg-tertiary);
  animation: skeletonShimmer 1.5s ease-in-out infinite;
}
.w-40 { width: 40%; }
.w-28 { width: 28%; }
.skeleton-block {
  width: 100%;
  height: 120px;
  border-radius: var(--radius-lg);
  background: var(--bg-tertiary);
  animation: skeletonShimmer 1.5s ease-in-out infinite;
}
@keyframes skeletonShimmer {
  0%   { opacity: 0.6; }
  50%  { opacity: 1.0; }
  100% { opacity: 0.6; }
}

/* ── Error State ── */
.txd-error-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-10) var(--sp-6);
  text-align: center;
  border-radius: var(--radius-xl);
}
.txd-error-msg {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── Desktop/wide adaptation ── */
@media (min-width: 768px) {
  .txd-body { padding: var(--sp-8) var(--sp-6); }
  .txd-amt-value { font-size: 3.5rem; }
}

/* ── Participants Panel ── */
.txd-participant-row {
  align-items: center;
  padding: var(--sp-3) 0;
}
.txd-participant-role {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--sp-2);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.txd-role-out {
  background: rgba(239,68,68,0.12);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.25);
}
.txd-role-in {
  background: rgba(34,197,94,0.12);
  color: var(--success);
  border: 1px solid rgba(34,197,94,0.25);
}
.txd-participant-name {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 600;
}
.txd-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #111;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px var(--primary-glow);
}
.txd-avatar-in {
  background: linear-gradient(135deg, #4ade80, #16a34a);
  box-shadow: 0 2px 8px rgba(34,197,94,0.3);
  color: #fff;
}

/* ══════════════════════════════════════
   Ultra-Professional Brand Login
   ══════════════════════════════════════ */
.page-neon-login {
  background: transparent !important;
  font-family: var(--font-primary), 'Inter', sans-serif;
  font-weight: 400;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.page-neon-login.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.neon-glass-card {
  background: rgba(15, 15, 18, 0.6);
  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 32px;
  padding: 56px 44px;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Crucial Lighting Effect: Ultra-smooth, diffused brand glow */
.neon-glass-card::before {
  content: "";
  position: absolute;
  top: -30%;
  left: -20%;
  width: 70%;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.15) 0%, transparent 60%);
  filter: blur(70px);
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.neon-glass-card > * {
  position: relative;
  z-index: 1;
}

.neon-input-group {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 10px 14px 10px 20px;
  display: flex;
  align-items: center;
  margin-top: 40px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
}

.neon-input-group:focus-within {
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.2), 0 0 20px rgba(212, 175, 55, 0.1);
}

.neon-input-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.neon-input-wrapper label {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
  font-weight: 600;
}

.neon-input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 400;
  outline: none;
  width: 100%;
  letter-spacing: -0.2px;
}

.neon-input::placeholder {
  color: rgba(255, 255, 255, 0.15);
}

.neon-submit-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  border-radius: 16px;
  width: 100%;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #08080a;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 32px;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3), inset 0 2px 5px rgba(255,255,255,0.2);
}

.neon-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5), inset 0 2px 5px rgba(255,255,255,0.2);
}

.neon-submit-btn:active {
  transform: translateY(1px);
}

.neon-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
  letter-spacing: 1px;
  margin: 36px 0;
}

.neon-divider::before,
.neon-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.neon-divider span {
  padding: 0 16px;
}

.neon-social-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 18px 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.neon-social-btn:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

