/* ═══════════════════════════════════════════════════════
   INEXOPAY PWA FINTRADE FINTECH SAAS MOBILE STYLES
   ═══════════════════════════════════════════════════════ */
:root {
  --primary: #4F46E5;
  --primary-dark: #312E81;
  --primary-light: #EEF2FF;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #F43F5E;
  --dark: #0F172A;
  --gray: #64748B;
  --border: #E2E8F0;
  --bg: #F8FAFC;
  --card-bg: #FFFFFF;
}

*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}
body{
  font-family:'Plus Jakarta Sans',sans-serif;
  background: #F8FAFC !important;
  color:var(--dark);
  padding-bottom:0;
  min-height:100vh;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Tab Pane - ensure content not hidden behind bottom nav, no horizontal scroll */
.app-tab-pane {
  padding-top: 62px !important; /* space for 52px fixed top bar + 10px spacing */
  padding-bottom: 110px !important; /* space for 60px bottom nav + 50px breathing room */
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
  background: #F8FAFC !important;
}

/* Mobile-native card rows — replaces horizontal tables */
.pwa-mobile-table { display:flex; flex-direction:column; gap:0.6rem; }
.pwa-mobile-row {
  display:flex; justify-content:space-between; align-items:flex-start;
  background:#F8FAFC; border:1px solid var(--border);
  border-radius:12px; padding:0.75rem; gap:8px;
}
.pwa-mobile-row-left { flex:1; min-width:0; }
.pwa-mobile-row-right { text-align:right; flex-shrink:0; }
.pwa-lbl-title { font-weight:700; font-size:12.5px; color:var(--dark); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pwa-lbl-sub { font-size:10px; color:var(--gray); margin-top:2px; }
.pwa-status-pill {
  font-size:9px; font-weight:800; text-transform:uppercase;
  padding:2px 8px; border-radius:999px; display:inline-block; margin-top:3px;
}
.pwa-status-pill.success { background:#ECFDF5; color:#047857; }
.pwa-status-pill.pending { background:#FEF3C7; color:#B45309; }
.pwa-status-pill.failed  { background:#FFE4E6; color:#BE123C; }

/* ── 1. SPLASH SCREEN ── */
#app-splash-screen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 50%, #312E81 100%);
  z-index: 2147483646 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  box-sizing: border-box;
  color: #FFFFFF;
  transition: opacity 0.3s ease;
  overflow: hidden;
}
.splash-logo-box {
  width: 96px;
  height: 96px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 16px 36px rgba(0,0,0,0.3);
  animation: pulse-logo 2s infinite ease-in-out;
}
@keyframes pulse-logo {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.splash-title {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  text-align: center;
  margin: 0 0 6px 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
  max-width: 280px;
  line-height: 1.2;
  word-break: break-word;
}
.splash-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  margin: 0 0 2rem 0;
  font-weight: 600;
  text-align: center;
}
.splash-progress-track {
  width: 180px;
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  overflow: hidden;
}
.splash-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #6366F1, #10B981);
  border-radius: 999px;
}

/* ── 2. PWA INSTALL BANNER ── */
#pwa-install-banner {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  box-shadow: 0 12px 32px -4px rgba(15,23,42,0.15);
  z-index: 9990;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.install-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.install-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
}
.install-text h4 { font-size: 13px; font-weight: 800; color: var(--dark); }
.install-text p { font-size: 10.5px; color: var(--gray); }

/* ── 3. TOP APP BAR ── */
.app-topbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 52px !important;
  z-index: 10000 !important;
  background: var(--app-header-bg, #C7F5FE) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  padding: 0.4rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.app-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.app-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.app-brand-name {
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--dark);
}

/* ── 4. BOTTOM NAVIGATION BAR ── */
.app-bottom-nav {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 60px;
  background: #ffffff !important;
  border-top: 2px solid #E2E8F0;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-around !important;
  z-index: 2147483647 !important;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.12);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: 4px;
  padding-right: 4px;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--gray);
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.2s ease;
  padding: 4px 2px;
  text-align: center;
}
.bottom-nav-item span {
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.1;
}
.bottom-nav-item i { width: 20px; height: 20px; }
.bottom-nav-item.active {
  color: var(--primary);
  font-weight: 800;
}

/* ── 5. SIDE DRAWER MENU ── */
#app-side-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 280px;
  max-width: 85vw;
  background: #FFFFFF;
  z-index: 30000 !important;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  display: none;
  flex-direction: column;
  box-shadow: 10px 0 30px rgba(0,0,0,0.15);
  overflow-y: auto;
}
#app-side-drawer.open {
  display: flex !important;
  transform: translateX(0) !important;
}
#drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.45);
  backdrop-filter: blur(4px);
  z-index: 29999 !important;
  display: none;
}
.drawer-header {
  background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 50%, #312E81 100%);
  color: #FFFFFF;
  padding: 1.5rem 1.25rem;
}

/* ── 6. CARDS & GRID ── */
.pwa-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 16px -2px rgba(0,0,0,0.03);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
.service-icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 0.5rem;
  text-decoration: none;
  color: var(--dark);
  text-align: center;
  transition: all 0.2s ease;
}
.service-icon-card:active { transform: scale(0.95); background: var(--primary-light); }
.service-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-icon-label { font-size: 10.5px; font-weight: 700; color: var(--dark); line-height: 1.2; }

/* ── 7. CAMERA MODAL ── */
#camera-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 20000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
#camera-video-preview {
  width: 100%;
  max-width: 480px;
  border-radius: 16px;
  background: #000;
}

/* ── 8. NEW MOCKUP STYLING (101% MATCH) ── */
.auth-bg {
  background: linear-gradient(135deg, #F0F4FA 0%, #E2E8F0 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.auth-bg::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
      linear-gradient(45deg, rgba(37, 99, 235, 0.02) 25%, transparent 25%), 
      linear-gradient(-45deg, rgba(37, 99, 235, 0.02) 25%, transparent 25%), 
      linear-gradient(135deg, rgba(37, 99, 235, 0.02) 25%, transparent 25%), 
      linear-gradient(-135deg, rgba(37, 99, 235, 0.02) 25%, transparent 25%);
  background-size: 80px 80px;
  background-position: 40px 0, 40px 0, 0 0, 0 0;
  z-index: 0;
  pointer-events: none;
}
.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #CBD5E1;
  transition: .3s;
  border-radius: 20px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
input:checked + .slider { background-color: #2563EB; }
input:checked + .slider:before { transform: translateX(18px); }

/* Banner Carousel */
.pwa-carousel {
  position: relative;
  width: 100%;
  height: 110px;
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 1.25rem;
}
.carousel-inner {
  display: flex;
  width: 300%;
  height: 100%;
  animation: slide-banner 12s infinite ease-in-out;
}
.carousel-slide {
  width: 33.333%;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  color: #FFFFFF;
}
@keyframes slide-banner {
  0%, 28% { transform: translateX(0); }
  33%, 61% { transform: translateX(-33.333%); }
  66%, 95% { transform: translateX(-66.666%); }
}

/* Metric Widgets */
.metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.metric-box {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}
.metric-val {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--dark);
  margin-top: 2px;
}

/* CSS Bar Chart */
.chart-bar-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 100px;
  padding-top: 10px;
  border-bottom: 1px solid var(--border);
}
.chart-bar {
  width: 16px;
  background: linear-gradient(180deg, #6366F1 0%, #4F46E5 100%);
  border-radius: 4px 4px 0 0;
  position: relative;
}
.chart-bar:hover:after {
  content: attr(data-value);
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: #fff;
  font-size: 8px;
  padding: 2px 4px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Biometric status cards */
.hardware-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: #F8FAFC;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
}
.status-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
}
.status-indicator.allowed { color: #10B981; }
.status-indicator.denied { color: #F43F5E; }
.status-indicator.connected { color: #10B981; }
.status-indicator.disconnected { color: #64748B; }

/* Premium Catalog & Card styling */
.pwa-banking-offer-card, .pwa-product-catalog-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}
.pwa-banking-offer-card:hover, .pwa-product-catalog-card:hover {
  transform: translateY(-2.5px);
  border-color: var(--primary) !important;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.09) !important;
}
.pwa-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 6px;
  text-transform: uppercase;
  display: inline-block;
  letter-spacing: 0.02em;
}
.pwa-badge-success {
  background: #ECFDF5;
  color: #059669;
}
.pwa-badge-info {
  background: #E0F2FE;
  color: #0369A1;
}
.pwa-badge-warning {
  background: #FEF3C7;
  color: #D97706;
}
.pwa-badge-danger {
  background: #FFE4E6;
  color: #E11D48;
}

/* Hidden Utility class for PWA Modals/Panes */
.hidden {
  display: none !important;
}

