/* RPayment V2 - Premium Mobile-First Architecture Stylesheet */
:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --accent-color: #2563eb;
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --accent-glow: rgba(37, 99, 235, 0.2);
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --border-color: #e2e8f0;
  --card-bg: #ffffff;
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
  --shadow-md: 0 10px 20px -5px rgba(0,0,0,0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08);
}

body.dark-mode {
  --bg-primary: #020617;
  --bg-secondary: #0f172a;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-color: #3b82f6;
  --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --accent-glow: rgba(59, 130, 246, 0.25);
  --card-bg: #1e293b;
  --border-color: #334155;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
  --shadow-md: 0 10px 20px -5px rgba(0,0,0,0.3);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
}

/* Mobile Application Shell Container */
.app-container {
  width: 100%;
  max-width: 480px; /* Centered layout block perfectly matching Android displays */
  min-height: 100vh;
  background-color: var(--bg-primary);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0,0,0,0.05);
  padding-bottom: 90px; /* Space for the persistent bottom menu */
}

/* Moving Particle and Gradient Canvas Overlay Layers */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.animated-bg {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 100vh;
  z-index: -1;
  background: linear-gradient(145deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.orb-effect {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, rgba(255,255,255,0) 70%);
  filter: blur(20px);
  animation: orbMovement 12s infinite alternate ease-in-out;
  z-index: 0;
  pointer-events: none;
}
.orb-1 { top: 10%; left: -20px; }
.orb-2 { bottom: 20%; right: -20px; animation-delay: -4s; }

@keyframes orbMovement {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.15); }
  100% { transform: translate(-20px, 40px) scale(0.9); }
}

/* App Header Header Bar Configuration */
.app-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  position: sticky;
  top: 0;
  background-color: rgba(248, 250, 252, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}
body.dark-mode .app-header {
  background-color: rgba(2, 6, 23, 0.8);
}

.app-brand {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-color);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Core Dashboard Content Views Layout */
.app-body {
  padding: 20px;
  z-index: 5;
  flex: 1;
  width: 100%;
}

.view-panel {
  display: none;
}
.view-panel.active {
  display: block;
  animation: slideViewIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Premium Adaptive Card Containers Layout */
.card-premium {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-premium:active {
  transform: scale(0.98);
}

.card-wallet {
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 15px 30px rgba(37, 99, 235, 0.25);
}

/* Bottom Mini Grid Sticky Navigation Menu Bar */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 72px;
  background-color: var(--card-bg);
  border-top: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 100;
  padding: 6px 10px;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.03);
}

.nav-tab-btn {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  gap: 4px;
  position: relative;
}

.nav-tab-btn i {
  font-size: 18px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: all 0.25s ease;
}

.nav-tab-btn.active {
  color: var(--accent-color);
}
.nav-tab-btn.active i {
  background-color: var(--bg-secondary);
  color: var(--accent-color);
  transform: translateY(-2px);
}

/* General Typography Form Fields Layout */
h1 { font-size: 24px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }
h2 { font-size: 18px; font-weight: 700; color: var(--text-primary); }
p { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }

.form-block {
  margin-bottom: 16px;
}
.form-block label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-premium {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  outline: none;
}
.input-premium:focus {
  border-color: var(--accent-color);
  background-color: var(--card-bg);
}

/* Quick Nominal Grid Selector buttons Layout */
.nominal-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 16px;
}
.btn-shortcut {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  text-align: center;
}
.btn-shortcut:active, .btn-shortcut.selected {
  background-color: var(--accent-color);
  color: #ffffff;
  border-color: var(--accent-color);
}

/* Mobile Premium Mini Buttons */
.btn-premium {
  width: 100%;
  padding: 14px 20px;
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px var(--accent-glow);
  position: relative;
  overflow: hidden;
}
.btn-premium:active { transform: scale(0.99); opacity: 0.95; }

.btn-premium-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: none;
}

.btn-premium-danger {
  background: var(--danger-color);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* Dynamic Ripple Animation Injectors */
.ripple-element {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: rippleAnimation 0.5s linear;
  background-color: rgba(255, 255, 255, 0.3);
  pointer-events: none;
}
.btn-premium-secondary .ripple-element {
  background-color: rgba(0, 0, 0, 0.08);
}
@keyframes rippleAnimation {
  to { transform: scale(4); opacity: 0; }
}

/* Status Badges with Custom Core Animations */
.status-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.status-pending { background-color: rgba(245, 158, 11, 0.12); color: var(--warning-color); animation: pulseAnimation 2s infinite; }
.status-success { background-color: rgba(16, 185, 129, 0.12); color: var(--success-color); animation: popAnimation 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.status-expired { background-color: rgba(239, 68, 68, 0.12); color: var(--danger-color); animation: shakeAnimation 0.4s ease; }
.status-diproses { background-color: rgba(37, 99, 235, 0.12); color: var(--accent-color); }
.status-gagal { background-color: rgba(239, 68, 68, 0.12); color: var(--danger-color); }
.status-cancelled { background-color: rgba(100, 116, 139, 0.12); color: var(--text-secondary); }

@keyframes pulseAnimation {
  0%, 100% { opacity: 0.7; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.02); }
}
@keyframes popAnimation {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes shakeAnimation {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

/* Spinner Icon Elements */
.loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spinnerRotate 0.7s linear infinite;
  display: inline-block;
}
.spinner-dark {
  border: 2px solid var(--border-color);
  border-top-color: var(--accent-color);
}
@keyframes spinnerRotate { to { transform: rotate(360deg); } }

/* Quick Status Filtering Matrix Row Scroller */
.filter-tab-scroller {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
  scrollbar-width: none;
}
.filter-tab-scroller::-webkit-scrollbar { display: none; }

.filter-tab-item {
  padding: 8px 16px;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}
.filter-tab-item.active {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

/* Staggered Row Animation List Framework */
.list-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--card-bg);
  margin-bottom: 8px;
  border-radius: var(--radius-md);
  opacity: 0;
  transform: translateY(10px);
}
.list-item-row.animated {
  animation: itemFadeIn 0.35s forwards ease-out;
}
@keyframes itemFadeIn { to { opacity: 1; transform: translateY(0); } }

/* Sticky QR Scanline Layout Elements */
.qr-box-frame {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 16px auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 10px;
  background: white;
  overflow: hidden;
}
.qr-line-scanner {
  position: absolute;
  left: 0; width: 100%; height: 2.5px;
  background: linear-gradient(to right, transparent, var(--accent-color), transparent);
  animation: moveScanline 2.2s ease-in-out infinite;
}
@keyframes moveScanline { 0%, 100% { top: 0%; } 50% { top: 100%; } }

/* Androidsnackbar Toast Architecture */
.toast-snackbar {
  position: fixed;
  bottom: 86px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  width: calc(100% - 40px);
  max-width: 440px;
  background-color: #1e293b;
  color: #ffffff;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast-snackbar.visible { transform: translateX(-50%) translateY(0); }

/* Realtime Broadcast Banners ticker adjustments */
.broadcast-ticker-banner {
  background-color: rgba(37, 99, 235, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
  border-left: 4px solid var(--accent-color);
}
.broadcast-ticker-banner.warning { background-color: rgba(245, 158, 11, 0.08); border-left-color: var(--warning-color); }
.broadcast-ticker-banner.important { background-color: rgba(239, 68, 68, 0.08); border-left-color: var(--danger-color); }

/* Android Keypad Grid Custom Styles */
.keypad-matrix {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 320px;
  margin: 24px auto 0 auto;
}
.keypad-cell {
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background-color: var(--card-bg);
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.keypad-cell:active {
  background-color: var(--accent-color);
  color: #ffffff;
  transform: scale(0.92);
}

.dots-holder {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
}
.dot-item {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--text-secondary);
}
.dot-item.active {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  transform: scale(1.15);
}

/* Toggle Switch Styling */
.theme-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.theme-switch input { opacity: 0; width: 0; height: 0; }
.theme-slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--border-color); border-radius: 24px; transition: 0.2s;
}
.theme-slider:before {
  position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px;
  background-color: white; border-radius: 50%; transition: 0.2s;
}
input:checked + .theme-slider { background-color: var(--accent-color); }
input:checked + .theme-slider:before { transform: translateX(20px); }

/* Utility Classes */
.flex-split { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { display: flex; gap: 8px; align-items: center; }
.margin-top { margin-top: 16px; }
.text-center { text-align: center; }
