/* iWallet Pro - Premium Fintech CSS */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #F4CB2F;
  --primary-dark: #D4A800;
  --primary-light: #FFF3C4;
  --secondary: #F5CC2E;
  --success: #22C55E;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;
  --dark: #0F172A;
  --dark2: #1E293B;
  --dark3: #334155;
  --gray: #64748B;
  --gray-light: #94A3B8;
  --border: #E2E8F0;
  --bg: #F8FAFC;
  --white: #FFFFFF;
  --font: 'Plus Jakarta Sans', sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow: 0 4px 20px rgba(0,0,0,.10);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.15);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --nav-height: 70px;
  --transition: all .25s cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--dark); line-height: 1.6; -webkit-font-smoothing: antialiased; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ── UTILITY ── */
.text-primary { color: var(--primary) !important; }
.bg-primary   { background: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger) !important; }
.text-gray    { color: var(--gray) !important; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

/* ── MOBILE WRAPPER ── */
.mobile-app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--white);
  position: relative;
  overflow: hidden;
}

/* ── BALANCE CARD ── */
.balance-card {
  background: linear-gradient(135deg, var(--primary) 0%, #E8A800 100%);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
  color: var(--dark);
}
.balance-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: rgba(255,255,255,.12);
  border-radius: 50%;
}
.balance-card::after {
  content: '';
  position: absolute;
  bottom: -60px; right: 20px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
}
.balance-label { font-size: 13px; font-weight: 500; opacity: .8; margin-bottom: 6px; }
.balance-amount {
  font-size: 32px; font-weight: 800; letter-spacing: -1px;
  display: flex; align-items: center; gap: 8px;
}
.balance-amount .symbol { font-size: 22px; font-weight: 700; }
.balance-account { font-size: 13px; margin-top: 12px; opacity: .75; display: flex; align-items: center; gap: 6px; }
.balance-account .copy-btn { cursor: pointer; opacity: .8; transition: var(--transition); }
.balance-account .copy-btn:hover { opacity: 1; }
.balance-eye { position: absolute; top: 20px; right: 20px; cursor: pointer; opacity: .8; }

/* ── QUICK ACTIONS ── */
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; }
.action-btn {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex; align-items: center; justify-content: space-between;
  text-decoration: none; color: var(--dark);
  transition: var(--transition);
  cursor: pointer;
}
.action-btn:hover { border-color: var(--primary); background: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow); }
.action-btn .icon-wrap {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.action-btn.deposit .icon-wrap { background: rgba(34,197,94,.15); color: var(--success); }
.action-btn.withdraw .icon-wrap { background: rgba(99,102,241,.15); color: #6366F1; }
.action-label { font-weight: 700; font-size: 15px; }
.action-sub { font-size: 12px; color: var(--gray); }

/* ── METHOD ICONS ── */
.methods-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 0 16px; }
.method-item { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; text-decoration: none; }
.method-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--bg); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); overflow: hidden;
}
.method-icon img { width: 36px; height: 36px; object-fit: contain; }
.method-item:hover .method-icon { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); }
.method-name { font-size: 12px; font-weight: 600; color: var(--dark); text-align: center; }

/* ── TRANSACTION LIST ── */
.txn-item {
  display: flex; align-items: center; padding: 14px 16px;
  border-bottom: 1px solid var(--bg); transition: var(--transition);
  text-decoration: none; color: var(--dark);
}
.txn-item:hover { background: var(--bg); }
.txn-icon {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 20px; margin-right: 12px;
}
.txn-icon.deposit { background: rgba(34,197,94,.15); color: var(--success); }
.txn-icon.withdraw { background: rgba(99,102,241,.15); color: #6366F1; }
.txn-info { flex: 1; }
.txn-title { font-weight: 700; font-size: 14px; }
.txn-sub { font-size: 12px; color: var(--gray); margin-top: 2px; }
.txn-amount { text-align: right; }
.txn-amount .amount { font-weight: 700; font-size: 15px; }
.txn-amount .amount.deposit { color: var(--success); }
.txn-amount .amount.withdraw { color: #6366F1; }
.txn-status { font-size: 11px; margin-top: 3px; }

/* ── STATUS BADGES ── */
.badge-success { background: rgba(34,197,94,.15); color: var(--success); border-radius: 99px; padding: 3px 10px; font-size: 11px; font-weight: 600; }
.badge-warning { background: rgba(245,158,11,.15); color: var(--warning); border-radius: 99px; padding: 3px 10px; font-size: 11px; font-weight: 600; }
.badge-danger  { background: rgba(239,68,68,.15); color: var(--danger); border-radius: 99px; padding: 3px 10px; font-size: 11px; font-weight: 600; }
.badge-info    { background: rgba(59,130,246,.15); color: var(--info); border-radius: 99px; padding: 3px 10px; font-size: 11px; font-weight: 600; }

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  background: var(--white); border-top: 1.5px solid var(--border);
  display: flex; align-items: center;
  height: var(--nav-height); z-index: 100;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 4px; text-decoration: none; color: var(--gray-light);
  padding: 8px; transition: var(--transition); cursor: pointer;
}
.nav-item.active { color: var(--primary); }
.nav-item .nav-icon { font-size: 22px; transition: var(--transition); }
.nav-item .nav-label { font-size: 11px; font-weight: 600; letter-spacing: .3px; }
.nav-item.active .nav-icon { transform: translateY(-2px); }
.nav-indicator {
  width: 24px; height: 3px; background: var(--primary);
  border-radius: 99px; position: absolute; bottom: 0; transition: var(--transition);
  opacity: 0;
}
.nav-item.active .nav-indicator { opacity: 1; }

/* ── SECTION HEADER ── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 8px;
}
.section-title { font-size: 16px; font-weight: 700; }
.section-link { font-size: 13px; color: var(--primary); font-weight: 600; text-decoration: none; }

/* ── PAGE HEADER ── */
.page-header {
  display: flex; align-items: center; padding: 16px;
  background: var(--white); border-bottom: 1px solid var(--border);
}
.page-header .back-btn { margin-right: 12px; background: none; border: none; cursor: pointer; color: var(--dark); font-size: 20px; padding: 4px; }
.page-header .page-title { font-size: 18px; font-weight: 700; }

/* ── FORM ELEMENTS ── */
.iwallet-input {
  width: 100%; padding: 14px 16px; font-size: 15px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font); background: var(--white); color: var(--dark);
  transition: var(--transition); outline: none;
}
.iwallet-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(244,203,47,.2); }
.iwallet-input-wrap { position: relative; }
.iwallet-input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gray); }
.iwallet-input.with-icon { padding-left: 44px; }
.iwallet-input-right { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); cursor: pointer; color: var(--gray); }

.iwallet-label { font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 6px; display: block; }
.form-group { margin-bottom: 16px; }

/* ── BUTTONS ── */
.btn-primary-custom {
  width: 100%; padding: 15px; font-size: 16px; font-weight: 700;
  background: var(--primary); color: var(--dark); border: none;
  border-radius: var(--radius-sm); cursor: pointer; font-family: var(--font);
  transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary-custom:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(244,203,47,.4); }
.btn-primary-custom:active { transform: translateY(0); }
.btn-primary-custom:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.btn-outline-custom {
  padding: 10px 20px; font-size: 14px; font-weight: 600;
  background: transparent; color: var(--primary); border: 1.5px solid var(--primary);
  border-radius: var(--radius-xs); cursor: pointer; font-family: var(--font);
  transition: var(--transition);
}
.btn-outline-custom:hover { background: var(--primary); color: var(--dark); }

/* ── AMOUNT PILLS ── */
.amount-pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.amount-pill {
  padding: 6px 14px; border: 1.5px solid var(--border); border-radius: 99px;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition);
  background: var(--white); color: var(--dark); font-family: var(--font);
}
.amount-pill:hover, .amount-pill.active { background: var(--primary); border-color: var(--primary); color: var(--dark); }

/* ── INFO BOX ── */
.info-box {
  background: var(--primary-light); border: 1.5px solid rgba(244,203,47,.4);
  border-radius: var(--radius-sm); padding: 14px; margin: 12px 0;
}
.info-box-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin-bottom: 6px; }
.info-box-row:last-child { margin-bottom: 0; font-weight: 700; }
.info-box-row .label { color: var(--gray); }
.info-box-row .value { font-weight: 600; }

/* ── METHOD SELECT ── */
.method-select-item {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--transition); margin-bottom: 10px;
}
.method-select-item:hover { border-color: var(--primary); background: var(--primary-light); }
.method-select-item.selected { border-color: var(--primary); background: var(--primary-light); }
.method-select-item img { width: 36px; height: 36px; object-fit: contain; }
.method-select-item .name { font-weight: 700; font-size: 15px; }
.method-select-item .sub  { font-size: 12px; color: var(--gray); }
.method-select-item .check { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.method-select-item.selected .check { background: var(--primary); border-color: var(--primary); }

/* ── MERCHANT BOX ── */
.merchant-box {
  background: linear-gradient(135deg, var(--primary) 0%, #E8A800 100%);
  border-radius: var(--radius-sm); padding: 16px; display: flex; align-items: center;
  justify-content: space-between; margin: 12px 0;
}
.merchant-number { font-size: 22px; font-weight: 800; color: var(--dark); letter-spacing: 1px; }
.copy-number-btn {
  background: rgba(255,255,255,.3); border: none; border-radius: 8px;
  padding: 8px 16px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--dark);
  transition: var(--transition);
}
.copy-number-btn:hover { background: rgba(255,255,255,.5); }

/* ── PROFILE ── */
.profile-avatar-wrap { text-align: center; padding: 24px 16px; }
.profile-avatar {
  width: 90px; height: 90px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--primary); box-shadow: 0 0 0 6px var(--primary-light);
  margin-bottom: 12px;
}
.profile-name { font-size: 20px; font-weight: 800; }
.profile-id { font-size: 13px; color: var(--gray); display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 4px; }
.verified-badge { background: rgba(34,197,94,.1); color: var(--success); font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 99px; }

.profile-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px 16px;
}
.profile-stat {
  background: var(--bg); border-radius: var(--radius-sm); padding: 14px;
  display: flex; align-items: center; gap: 12px;
}
.profile-stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.profile-stat-value { font-size: 16px; font-weight: 800; }
.profile-stat-label { font-size: 12px; color: var(--gray); }

.profile-menu-item {
  display: flex; align-items: center; padding: 16px; border-bottom: 1px solid var(--bg);
  text-decoration: none; color: var(--dark); transition: var(--transition);
  cursor: pointer;
}
.profile-menu-item:hover { background: var(--bg); }
.profile-menu-item .menu-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 18px; margin-right: 14px; }
.profile-menu-item .menu-label { font-weight: 600; font-size: 15px; }
.profile-menu-item .menu-arrow { margin-left: auto; color: var(--gray-light); }
.profile-menu-item.danger .menu-label { color: var(--danger); }
.profile-menu-item.danger .menu-icon { background: rgba(239,68,68,.1); }

/* ── TOP BAR ── */
.top-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 8px;
}
.user-greeting .welcome { font-size: 13px; color: var(--gray); }
.user-greeting .name { font-size: 20px; font-weight: 800; }
.top-bar .avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); }
.notif-btn { position: relative; background: none; border: none; cursor: pointer; padding: 8px; }
.notif-btn .badge { position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; background: var(--danger); border-radius: 50%; font-size: 11px; font-weight: 700; color: var(--white); display: flex; align-items: center; justify-content: center; }

/* ── FILTERS ── */
.filter-tabs {
  display: flex; gap: 8px; padding: 8px 16px; overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  padding: 7px 16px; border-radius: 99px; font-size: 13px; font-weight: 600;
  white-space: nowrap; cursor: pointer; transition: var(--transition);
  border: 1.5px solid var(--border); background: var(--white); color: var(--gray);
  font-family: var(--font);
}
.filter-tab.active, .filter-tab:hover { background: var(--primary); border-color: var(--primary); color: var(--dark); }

/* ── SEARCH BOX ── */
.search-box { padding: 8px 16px; }
.search-wrap { position: relative; }
.search-input {
  width: 100%; padding: 11px 16px 11px 44px; border-radius: 99px;
  border: 1.5px solid var(--border); font-size: 14px; outline: none;
  background: var(--bg); font-family: var(--font); transition: var(--transition);
}
.search-input:focus { border-color: var(--primary); background: var(--white); }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--gray); }

/* ── CARD ── */
.iwallet-card {
  background: var(--white); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border); margin: 8px 16px;
}

/* ── SUCCESS / STATUS PAGES ── */
.status-icon { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 36px; margin: 0 auto 20px; }
.status-icon.success { background: rgba(34,197,94,.15); color: var(--success); }
.status-icon.pending { background: rgba(245,158,11,.15); color: var(--warning); }
.status-icon.failed  { background: rgba(239,68,68,.15); color: var(--danger); }

/* ── DETAIL ROWS ── */
.detail-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--bg); font-size: 14px; }
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--gray); }
.detail-value { font-weight: 600; }

/* ── SPINNER ── */
.spinner { width: 20px; height: 20px; border: 2px solid rgba(0,0,0,.2); border-top-color: var(--dark); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── ANIMATIONS ── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.fade-in-up { animation: fadeInUp .4s ease both; }
.fade-in { animation: fadeIn .3s ease both; }

/* ── TOAST ── */
.iwallet-toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: var(--dark); color: var(--white); padding: 12px 24px;
  border-radius: 99px; font-size: 14px; font-weight: 600; z-index: 9999;
  animation: fadeInUp .3s ease; max-width: 320px; text-align: center;
  box-shadow: var(--shadow-lg);
}
.iwallet-toast.success { background: var(--success); }
.iwallet-toast.error   { background: var(--danger); }

/* ── MODAL ── */
.iwallet-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .2s ease;
}
.iwallet-modal {
  background: var(--white); border-radius: var(--radius) var(--radius) 0 0;
  padding: 24px; width: 100%; max-width: 430px;
  max-height: 90vh; overflow-y: auto;
  animation: slideUp .3s cubic-bezier(.4,0,.2,1);
}
.modal-handle { width: 40px; height: 4px; background: var(--border); border-radius: 99px; margin: 0 auto 20px; }

/* ── PIN INPUT ── */
.pin-input {
  letter-spacing: 10px; font-size: 24px; text-align: center;
  font-weight: 800;
}

/* ── CONTENT PADDING ── */
.content-area { padding-bottom: calc(var(--nav-height) + 16px); }

/* ── SCROLLABLE AREA ── */
.page-scroll { overflow-y: auto; height: calc(100vh - var(--nav-height)); }

/* ── RESPONSIVE ── */
@media (max-width: 430px) { .mobile-app { max-width: 100%; } }
@media (min-width: 768px) {
  .mobile-app { box-shadow: var(--shadow-lg); margin: 20px auto; min-height: calc(100vh - 40px); border-radius: var(--radius); }
}

/* ── LOGIN PAGE ── */
.login-page {
  min-height: 100vh; background: linear-gradient(135deg, #FFF8DC 0%, #FFF3C4 30%, #FFFDE7 60%, #FFF9E6 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; position: relative; overflow: hidden;
}
.login-page::before {
  content: ''; position: absolute; top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(244,203,47,.3) 0%, transparent 70%);
  border-radius: 50%;
}
.login-page::after {
  content: ''; position: absolute; bottom: -100px; left: -100px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(244,203,47,.2) 0%, transparent 70%);
  border-radius: 50%;
}
.login-card {
  background: var(--white); border-radius: 28px; padding: 40px;
  width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,.12);
  position: relative; z-index: 1;
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo img { width: 72px; height: 72px; }
.login-logo h1 { font-size: 28px; font-weight: 800; margin-top: 8px; }
.login-logo h1 span { color: var(--primary); }
.login-logo p { color: var(--gray); font-size: 14px; }

/* ── FLOATING COINS ── */
.float-coin {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFD700, #B8860B);
  box-shadow: 0 4px 15px rgba(0,0,0,.2); animation: float 6s ease-in-out infinite;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2em; color: rgba(255,255,255,.9); font-weight: 800;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33%       { transform: translateY(-20px) rotate(5deg); }
  66%       { transform: translateY(-10px) rotate(-5deg); }
}
