/* ==========================================================================
   TurantPay Web — Human-Crafted Vibrant Fintech Color Palette & Design System
   Sunset Coral Flame (#FF521B / #FF7A00) + Cyber Indigo (#6366F1) + Obsidian Midnight (#070B14)
   ========================================================================== */

:root {
  /* Color Tokens - Vibrant Human Palette */
  --bg-app: #070B14;
  --bg-surface-dark: #0F172A;
  --bg-surface-glass: rgba(15, 23, 42, 0.75);
  --bg-card: rgba(22, 30, 49, 0.75);
  --bg-card-hover: rgba(33, 45, 73, 0.85);
  
  /* Primary Accents */
  --accent-sunset: #FF521B;
  --accent-sunset-hover: #FF7A00;
  --accent-sunset-glow: rgba(255, 82, 27, 0.4);
  --accent-sunset-subtle: rgba(255, 82, 27, 0.15);

  /* Secondary Indigo Accents */
  --accent-indigo: #6366F1;
  --accent-indigo-hover: #4F46E5;
  --accent-indigo-glow: rgba(99, 102, 241, 0.35);
  --accent-indigo-subtle: rgba(99, 102, 241, 0.15);

  /* Success Emerald */
  --accent-emerald: #00F5A0;
  --accent-emerald-subtle: rgba(0, 245, 160, 0.12);
  
  /* Text Tokens */
  --text-main: #FFFFFF;
  --text-dim: #94A3B8;
  --text-muted: #64748B;
  
  /* Borders */
  --border-light: rgba(255, 255, 255, 0.08);
  --border-sunset: rgba(255, 82, 27, 0.45);
  --border-indigo: rgba(99, 102, 241, 0.4);
  
  /* Layout Tokens */
  --max-width: 480px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-full: 9999px;
  
  /* Typography */
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-brand: 'Outfit', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-main);
  background-color: #02040A;
  background-image: 
    radial-gradient(at 15% 15%, rgba(255, 82, 27, 0.08) 0px, transparent 50%),
    radial-gradient(at 85% 85%, rgba(99, 102, 241, 0.08) 0px, transparent 50%);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* Container Frame */
.app-container {
  width: 100%;
  max-width: var(--max-width);
  height: 100vh;
  max-height: 920px;
  background: var(--bg-app);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

@media (min-width: 500px) {
  .app-container {
    height: 92vh;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
  }
}

/* Header */
.app-header {
  height: 68px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-sunset), var(--accent-indigo));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 6px 18px var(--accent-sunset-glow);
}

.brand-name {
  font-family: var(--font-brand);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #FFFFFF, #E2E8F0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-header-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  color: var(--accent-sunset);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-header-icon:hover {
  background: var(--accent-sunset-subtle);
  border-color: var(--accent-sunset);
  transform: scale(1.06);
}

.badge-offline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-emerald);
  background: var(--accent-emerald-subtle);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 245, 160, 0.3);
}

.badge-dot {
  width: 7px;
  height: 7px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
}

/* PWA Installation Banner */
.pwa-banner {
  background: linear-gradient(90deg, var(--accent-indigo), var(--accent-sunset));
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #FFFFFF;
  flex-shrink: 0;
}

.pwa-banner-text h4 {
  font-size: 13px;
  font-weight: 800;
}

.pwa-banner-text p {
  font-size: 11px;
  opacity: 0.95;
}

.btn-install {
  background: #FFFFFF;
  color: #070B14;
  border: none;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

/* Content Body */
.app-content {
  flex: 1;
  padding: 22px 20px 30px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Greeting Section */
.greeting-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.greeting-subtitle {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--accent-sunset);
}

.greeting-title {
  font-family: var(--font-brand);
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
}

/* Hero Action Card (Scan & Pay) */
.hero-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(255, 82, 27, 0.15));
  border: 1px solid var(--border-sunset);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  box-shadow: 0 12px 35px var(--accent-sunset-subtle);
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, var(--accent-sunset-glow), transparent 70%);
  pointer-events: none;
}

.hero-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-card-icon {
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, var(--accent-sunset), var(--accent-sunset-hover));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 8px 22px var(--accent-sunset-glow);
}

.hero-card-info h3 {
  font-family: var(--font-brand);
  font-size: 19px;
  font-weight: 800;
}

.hero-card-info p {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 3px;
}

.btn-hero-action {
  width: 100%;
  background: linear-gradient(90deg, var(--accent-sunset), var(--accent-sunset-hover));
  color: #FFFFFF;
  border: none;
  padding: 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-brand);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 25px var(--accent-sunset-glow);
  transition: all 0.2s ease;
}

.btn-hero-action:active {
  transform: scale(0.98);
}

/* Section Titles */
.section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Quick Actions Grid */
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
}

.action-card:hover, .action-card:active {
  background: var(--bg-card-hover);
  border-color: var(--accent-indigo);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px var(--accent-indigo-subtle);
}

.action-icon-wrapper {
  width: 44px;
  height: 44px;
  background: var(--accent-indigo-subtle);
  border: 1px solid var(--border-indigo);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-indigo);
}

.action-card-title {
  font-family: var(--font-brand);
  font-size: 15px;
  font-weight: 700;
}

.action-card-desc {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Info Notice Box */
.info-card {
  background: var(--accent-indigo-subtle);
  border: 1px solid var(--border-indigo);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.55;
}

.info-card span {
  color: var(--accent-indigo);
  font-size: 22px;
}

/* Bottom Navigation */
.bottom-nav {
  height: 74px;
  background: rgba(7, 11, 20, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-around;
  position: relative;
  flex-shrink: 0;
  z-index: 10;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  width: 64px;
  transition: color 0.2s ease;
}

.nav-item.active {
  color: var(--accent-sunset);
}

.nav-item span {
  font-size: 26px;
}

/* Floating Action Button (FAB) */
.fab-scan {
  width: 62px;
  height: 62px;
  background: linear-gradient(135deg, var(--accent-sunset), var(--accent-sunset-hover));
  border-radius: var(--radius-full);
  border: 4px solid var(--bg-app);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -26px;
  box-shadow: 0 10px 30px var(--accent-sunset-glow);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.fab-scan:active {
  transform: scale(0.92);
}

/* Modal Overlay & Bottom Sheet Base */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 4, 10, 0.88);
  backdrop-filter: blur(12px);
  display: none;
  flex-direction: column;
  justify-content: flex-end;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  background: var(--bg-surface-dark);
  border-top: 1px solid var(--border-sunset);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 26px 22px 36px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -15px 50px rgba(0, 0, 0, 0.9);
}

.modal-overlay.active .bottom-sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 44px;
  height: 5px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  align-self: center;
  margin-bottom: 4px;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sheet-title {
  font-family: var(--font-brand);
  font-size: 22px;
  font-weight: 800;
}

.btn-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-dim);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Inputs */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--accent-sunset);
}

.input-field {
  background: rgba(7, 11, 20, 0.8);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  color: #FFFFFF;
  font-family: var(--font-main);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s ease;
}

.input-field:focus {
  border-color: var(--accent-sunset);
  box-shadow: 0 0 15px var(--accent-sunset-subtle);
}

.btn-action-submit {
  width: 100%;
  background: linear-gradient(90deg, var(--accent-sunset), var(--accent-sunset-hover));
  color: #FFFFFF;
  border: none;
  padding: 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 25px var(--accent-sunset-glow);
  margin-top: 8px;
}

/* ==========================================================================
   Full Page QR Scanner Overlay UI
   ========================================================================== */
.full-page-scanner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  z-index: 2000;
  display: none;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.full-page-scanner.active {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
}

.scanner-top-bar {
  height: 68px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  z-index: 10;
  color: #FFFFFF;
}

.btn-scanner-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.scanner-viewport {
  flex: 1;
  position: relative;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.scanner-viewport #reader {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
}

.scanner-viewport video {
  object-fit: cover !important;
  width: 100% !important;
  height: 100% !important;
}

.scanner-laser-line {
  position: absolute;
  width: 85%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-sunset), transparent);
  box-shadow: 0 0 20px var(--accent-sunset);
  top: 20%;
  animation: scanAnimation 2.5s infinite ease-in-out;
  pointer-events: none;
  z-index: 5;
}

@keyframes scanAnimation {
  0% { top: 20%; }
  50% { top: 75%; }
  100% { top: 20%; }
}

.scanner-bottom-actions {
  height: 115px;
  background: rgba(7, 11, 20, 0.95);
  backdrop-filter: blur(16px);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 16px;
  border-top: 1px solid var(--border-light);
}

.btn-scanner-tool {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: #FFFFFF;
  padding: 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-brand);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-scanner-tool:hover {
  background: var(--accent-sunset-subtle);
  border-color: var(--accent-sunset);
  color: var(--accent-sunset);
}

/* ==========================================================================
   NEW: Scanned Details Screen UI with Green Checkmark Icon
   ========================================================================== */
.full-page-result {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-app);
  z-index: 3000;
  display: none;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  overflow-y: auto;
}

.full-page-result.active {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.result-top-bar {
  height: 68px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7, 11, 20, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 10;
}

.result-body {
  flex: 1;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Top Success Icon with Tick Mark */
.scanned-success-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.scanned-success-icon {
  width: 72px;
  height: 72px;
  background: rgba(255, 82, 27, 0.12);
  border: 2px solid var(--accent-sunset);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 30px var(--accent-sunset-glow);
}

.scanned-success-icon .check-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 24px;
  color: var(--accent-emerald);
  background: var(--bg-app);
  border-radius: 50%;
}

.vpa-hero-card {
  background: linear-gradient(135deg, rgba(255, 82, 27, 0.2), rgba(99, 102, 241, 0.3));
  border: 1px solid var(--accent-sunset);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 10px 35px var(--accent-sunset-subtle);
  position: relative;
}

.vpa-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: var(--accent-sunset);
  margin-bottom: 8px;
}

.vpa-address {
  font-family: var(--font-brand);
  font-size: 24px;
  font-weight: 800;
  color: #FFFFFF;
  word-break: break-all;
  margin-bottom: 14px;
}

.vpa-copy-btn {
  background: linear-gradient(90deg, var(--accent-sunset), var(--accent-sunset-hover));
  color: #FFFFFF;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 20px var(--accent-sunset-glow);
}

/* Detail Display Rows */
.detail-row-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-row-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text-dim);
}

.detail-row-value {
  font-family: var(--font-brand);
  font-size: 17px;
  font-weight: 800;
  color: var(--accent-sunset);
}

.btn-secondary-outline {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border-sunset);
  color: var(--accent-sunset);
  padding: 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-brand);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Tooltip Popup Modal (iOS Help) */
.ios-tooltip-card {
  background: var(--bg-surface-dark);
  border: 1px solid var(--accent-sunset);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ios-step {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  text-align: left;
  color: var(--text-dim);
  line-height: 1.5;
}

.ios-step-num {
  width: 30px;
  height: 30px;
  background: var(--accent-sunset);
  color: #FFFFFF;
  border-radius: 50%;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Toast */
.toast {
  position: absolute;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--accent-indigo);
  color: #FFFFFF;
  border: 1px solid var(--accent-sunset);
  padding: 14px 24px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 5000;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Settings Cards */
.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-card-title {
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 800;
  color: var(--accent-sunset);
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-card-text {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
}

.btn-developer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-indigo);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  margin-top: 4px;
}
