/* ======================================================
   OUR BANK — Core Stylesheet
   Design language: wallet.zip (square, navy #042a4e, blue #0465ff)
   ====================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --navy:       #042a4e;
  --navy2:      #032852;
  --blue:       #0465ff;
  --red:        #dd1f28;
  --white:      #ffffff;
  --bg:         #f7f7f7;
  --bg2:        #f5f7fb;
  --border:     #e6e6e6;
  --border2:    #dddddd;
  --text:       #000000;
  --text2:      #091864;
  --text-sub:   #888888;
  --text-muted: #aaaaaa;
  --green:      #28a745;
  --green-bg:   #e6f4ea;
  --red-tx:     #dc2626;
  --red-bg:     #fce8e8;
  --orange:     #ea580c;
  --orange-bg:  #fff3e0;
  --h-nav:      50px;
  --b-nav:      70px;
}

html {
  height: 100%;
  /* Prevent double-tap zoom */
  touch-action: manipulation;
}

body {
  font-family: Arial, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  /* PWA: prevent pull-to-refresh bounce */
  overscroll-behavior: none;
}

/* ===== APP SHELL ===== */
.app-shell {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ===== TOP HEADER ===== */
.app-header {
  background: var(--navy);
  color: var(--white);
  height: var(--h-nav);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  z-index: 50;
}
.app-header .h-back {
  position: absolute;
  left: 10px;
  display: flex;
  align-items: center;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--white);
  padding: 8px;
}
.app-header .h-back svg { width: 20px; height: 20px; }
.app-header .h-title {
  font-size: 16px;
  font-weight: bold;
  text-align: center;
}
.app-header .h-action {
  position: absolute;
  right: 10px;
  display: flex;
  align-items: center;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--white);
  padding: 8px;
}
.app-header .h-notif {
  position: relative;
}
.app-header .notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  background: #fff;
  border-radius: 50%;
  border: 1.5px solid var(--navy);
}

/* ===== BOTTOM TAB BAR ===== */
.bottom-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--b-nav);
  background: var(--white);
  border-top: 1px solid var(--border2);
  box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  z-index: 99;
  padding: 0 8px;
}
.bottom-nav a {
  text-decoration: none;
  color: var(--navy);
  font-size: 11px;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 2px;
  height: 100%;
}
.bottom-nav a.active { color: var(--blue); }
.bottom-nav a svg    { width: 24px; height: 24px; }
.bottom-nav .nav-scan-btn {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
}
.bottom-nav .scan-circle {
  width: 58px;
  height: 58px;
  background: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -26px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.bottom-nav .scan-circle svg { stroke: var(--white); }

/* ===== SCROLLABLE PAGE BODY ===== */
.page-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(var(--b-nav) + 10px);
  -webkit-overflow-scrolling: touch;
}
.page-body.no-nav { padding-bottom: 10px; }

/* ===== PIN PAD ===== */
.pin-screen {
  position: fixed;
  inset: 0;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 10vh;
  z-index: 999;
  max-width: 430px;
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
}
.pin-lock-wrap {
  width: 70px; height: 70px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.pin-lock-wrap img { width: 32px; height: 32px; }
.pin-heading {
  color: var(--text2);
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 24px;
  text-align: center;
  padding: 0 20px;
}
.pin-dots {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
}
.pin-dot {
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  transition: background 0.15s;
}
.pin-dot.filled { background: var(--blue); }
.pin-forgot {
  color: var(--blue);
  font-size: 13px;
  text-decoration: none;
  margin-bottom: 16px;
}
.pin-error {
  color: var(--red);
  font-size: 13px;
  margin-bottom: 8px;
  min-height: 18px;
}
/* Pin pad grid — square keys, full width, anchored at bottom */
.pin-pad {
  position: absolute;
  bottom: 0; left: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  border-top: 1px solid var(--border);
}
.pin-key {
  border: none;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--white);
  height: clamp(70px, 16vw, 100px);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  font-weight: bold;
  color: var(--navy);
  cursor: pointer;
  transition: background 0.1s;
  font-family: Arial, sans-serif;
}
.pin-key:active { background: #f0f0f0; }
.pin-key svg    { width: 26px; height: 26px; }

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border: 1px solid var(--border2);
  border-radius: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  overflow: hidden;
}
.card-inner { padding: 15px; }

/* Account card — from account.php */
.account-card {
  background: var(--white);
  border: 1px solid var(--border2);
  border-radius: 0;
  padding: 15px;
  margin: 12px 15px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  height: 160px;
  justify-content: space-between;
  text-decoration: none;
  color: var(--text);
}
.account-card .acc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.account-card .acc-type-bar {
  display: flex; align-items: center; gap: 10px;
}
.account-card .acc-stripe {
  width: 4px; height: 40px;
  background: #1d6f93;
  border-radius: 2px;
  flex-shrink: 0;
}
.account-card .acc-label  { font-size: 11px; color: var(--text-sub); font-weight: bold; }
.account-card .acc-num    { font-size: 15px; font-weight: bold; color: var(--text); }
.account-card .acc-bal-label { font-size: 11px; color: var(--text-sub); text-align: right; }
.account-card .acc-amount { font-size: 18px; font-weight: bold; color: var(--text); text-align: right; }
.account-card .acc-footer { text-align: right; }
.account-card .acc-footer a {
  font-size: 13px; font-weight: bold; color: var(--blue);
  text-decoration: none;
}

/* ===== QR BOX — from myqr.php ===== */
.qr-box {
  background: var(--white);
  color: var(--text2);
  margin: 12px 15px;
  border-radius: 0;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  overflow: hidden;
}
.qr-box-header {
  background: #123f68;
  color: var(--white);
  padding: 12px;
  font-size: 15px;
  font-weight: bold;
}
.qr-box-body { padding: 16px; }
.qr-box-img  { width: 200px; height: 200px; display: block; margin: 0 auto; }
.qr-box-name {
  font-size: 15px; font-weight: bold;
  color: #030921; margin: 12px 0 4px;
}
.qr-box-label { font-size: 13px; color: var(--text-sub); }
.qr-box-value { font-size: 14px; color: #050618; margin-bottom: 12px; }
.qr-box-footer {
  background: var(--bg);
  padding: 8px 14px;
  text-align: left;
  font-size: 10px;
  font-weight: bold;
  color: var(--text);
}

/* ===== TRANSFER SERVICE — from transferservice.php ===== */
.transfer-header-bar {
  background: var(--navy);
  color: var(--white);
  padding: 8px 14px 20px;
}
.transfer-header-bar label { font-size: 13px; font-weight: normal; }
.ts-section {
  background: var(--bg2);
  margin: 0 14px 0;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  border-radius: 0;
}
.ts-section .ts-icon { width: 28px; height: 28px; border-radius: 50%; margin-right: 10px; flex-shrink: 0; }
.ts-section .ts-label { font-size: 11px; color: #666; display: block; margin-bottom: 2px; }
.ts-section .ts-value { font-size: 16px; font-weight: bold; color: var(--text2); }
.ts-section .ts-value-sm { font-size: 13px; color: var(--text2); }
.ts-ref { background: var(--bg2); margin: -1px 14px 0; padding: 10px 14px; }
.ts-ref .ref-label { font-size: 11px; color: var(--text-muted); margin-bottom: 3px; }
.ts-ref .ref-val   { font-size: 12px; color: var(--text-muted); letter-spacing: 0.5px; }
.ts-divider        { border: none; border-top: 1px solid #eee; margin: 4px 0; }
.amount-section    { padding: 16px 14px; border: 1px solid var(--border2); background: var(--white); margin: 14px 0 0; }
.amount-section label { font-weight: bold; font-size: 14px; }
.amount-hint       { font-size: 12px; color: var(--text-sub); margin: 4px 0 10px; }
.amount-row        { display: flex; align-items: center; }
.amount-input {
  flex: 1; font-size: 30px; font-weight: bold;
  color: #78A9FF; border: none;
  border-bottom: 1px solid var(--border2);
  outline: none; text-align: right;
  font-family: Arial, sans-serif;
  background: transparent;
}
.amount-currency { color: #78A9FF; font-weight: bold; font-size: 20px; margin-left: 6px; }
.btn-next {
  display: block; width: 100%; padding: 13px;
  background: var(--navy); color: var(--white);
  border: none; border-radius: 0;
  font-size: 16px; font-weight: bold;
  cursor: pointer; margin-top: 14px;
  font-family: Arial, sans-serif;
}
.btn-next:disabled { background: #ccc; cursor: not-allowed; }
.btn-cancel {
  display: block; text-align: center;
  color: var(--text-sub); text-decoration: none;
  font-size: 14px; margin-top: 10px;
}

/* ===== FORM ELEMENTS ===== */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 14px; font-weight: bold; color: var(--text2); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border2);
  border-radius: 0;
  font-size: 14px; font-family: Arial, sans-serif;
  color: var(--text2); background: var(--white);
  outline: none;
}
.form-control:focus { border-color: var(--blue); }
select.form-control { cursor: pointer; }

/* ===== BUTTONS ===== */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 13px;
  background: var(--navy); color: var(--white);
  border: none; border-radius: 0;
  font-size: 15px; font-weight: bold;
  cursor: pointer; font-family: Arial, sans-serif;
  text-decoration: none; text-align: center;
}
.btn:active { opacity: 0.85; }
.btn-blue   { background: var(--blue); }
.btn-red    { background: var(--red); }
.btn-ghost  { background: var(--bg); color: var(--text2); border: 1px solid var(--border2); }
.btn-sm     { padding: 8px 14px; font-size: 13px; width: auto; display: inline-flex; }
.btn-link   { background: none; color: var(--blue); border: none; font-weight: bold; font-size: 14px; text-decoration: none; cursor: pointer; width: auto; padding: 0; display: inline; }

/* ===== SECTION HEADER (quick banking style) ===== */
.section-bar {
  background: var(--white);
  text-align: center;
  font-size: 15px;
  font-weight: bold;
  color: var(--red);
  border-bottom: 2px solid var(--red);
  line-height: 30px;
  height: 30px;
  margin: 0 15px 10px;
}

/* ===== QUICK BANKING GRID ===== */
.quick-row {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 0 15px 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--blue) var(--bg);
  -webkit-overflow-scrolling: touch;
}
.quick-row::-webkit-scrollbar { height: 3px; }
.quick-row::-webkit-scrollbar-thumb { background: var(--blue); }
.quick-item {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  background: var(--white);
  padding: 16px 10px;
  border-radius: 0;
  min-width: 95px; height: 95px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  border: 1px solid var(--border);
  text-decoration: none;
  flex-shrink: 0;
  cursor: pointer;
}
.quick-item:active { background: var(--bg2); }
.quick-item svg  { width: 36px; height: 36px; }
.quick-item span { font-size: 13px; font-weight: bold; color: var(--text2); margin-top: 6px; }

/* ===== TRANSACTION LIST ===== */
.tx-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 15px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  text-decoration: none; color: var(--text);
  cursor: pointer;
}
.tx-item:active { background: var(--bg); }
.tx-dot {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.tx-dot.in   { background: var(--green-bg); color: var(--green); }
.tx-dot.out  { background: var(--red-bg);   color: var(--red-tx); }
.tx-dot.hold { background: var(--orange-bg); color: var(--orange); }
.tx-body    { flex: 1; min-width: 0; }
.tx-name    { font-size: 14px; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-time    { font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.tx-right   { text-align: right; flex-shrink: 0; }
.tx-amount  { font-size: 14px; font-weight: bold; white-space: nowrap; }
.tx-amount.pos { color: var(--green); }
.tx-amount.neg { color: var(--red-tx); }
.tx-bal     { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ===== POPUP / MODAL ===== */
.overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 998;
}
.popup {
  display: none; position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 300px; background: var(--white);
  border-radius: 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  z-index: 999; padding: 20px;
  font-family: Arial, sans-serif;
}
.popup h3 { font-size: 18px; font-weight: bold; margin-bottom: 8px; color: var(--text); }
.popup p  { font-size: 15px; color: var(--text2); }
.popup-btn {
  width: calc(100% + 40px);
  margin: 16px -20px -20px;
  background: var(--red);
  color: var(--white);
  border: none; padding: 14px;
  font-size: 16px; font-weight: bold;
  cursor: pointer; font-family: Arial, sans-serif;
}

/* ===== ALERTS ===== */
.alert {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  font-size: 13px; border-radius: 0;
  margin-bottom: 12px;
}
.alert-error   { background: #fce8e8; color: var(--red-tx); }
.alert-success { background: var(--green-bg); color: var(--green); }
.alert-warn    { background: var(--orange-bg); color: var(--orange); }

/* ===== BANNERS / ADS ===== */
.banner-area {
  width: 100%; padding: 0 15px 10px;
  overflow: hidden;
}
.banner-slides-wrap { width: 100%; overflow: hidden; }
.banner-slides {
  display: flex; gap: 10px;
  transition: transform .5s ease-in-out;
  will-change: transform;
}
.banner-slide {
  flex: 0 0 100%;
  aspect-ratio: 3/1;
  border-radius: 0;
  overflow: hidden;
  position: relative;
}
.banner-slide-inner {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  justify-content: center; padding: 14px 18px;
  color: var(--white);
  text-decoration: none;
}
.banner-title { font-size: 14px; font-weight: bold; margin-bottom: 4px; }
.banner-desc  { font-size: 12px; color: rgba(255,255,255,0.75); }
.banner-cta   {
  margin-top: 8px; background: var(--white);
  color: var(--navy); padding: 4px 12px;
  font-size: 12px; font-weight: bold;
  display: inline-block; border-radius: 0;
}
.banner-dots {
  display: flex; justify-content: center; gap: 6px; margin-top: 8px;
}
.banner-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.4); cursor: pointer;
}
.banner-dot.active { background: var(--white); }

/* ===== ADS SECTION ===== */
.ads-section { padding: 0 15px 10px; }
.ad-item {
  display: block; margin-bottom: 12px;
  text-decoration: none;
}
.ad-item-inner {
  width: 100%; aspect-ratio: 3/1;
  border-radius: 0; overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex; flex-direction: column;
  justify-content: center; padding: 14px 18px;
  color: var(--white);
}
.ad-title { font-size: 14px; font-weight: bold; margin-bottom: 4px; }
.ad-desc  { font-size: 12px; color: rgba(255,255,255,0.75); }

/* ===== SUCCESS PAGE ===== */
.success-wrap {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100dvh;
  background: var(--bg);
}
.success-icon {
  width: 100px; height: 100px;
  background: var(--green); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  animation: scaleIn .5s ease;
}
.success-icon svg { width: 50px; height: 50px; }
@keyframes scaleIn {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ===== CAMERA / SCAN ===== */
.scan-video {
  width: 100vw; max-width: 430px;
  height: 100dvh; object-fit: cover;
  display: block;
}
.scan-frame {
  position: absolute;
  top: 18%; left: 10%;
  width: 80%; height: 50%;
  border: 3px solid var(--blue);
  border-radius: 0;
  box-shadow: 0 0 15px rgba(4,101,255,0.5);
  pointer-events: none;
  z-index: 10;
}

/* ===== MISC ===== */
.divider { height: 1px; background: var(--border); margin: 10px 0; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-blue   { color: var(--blue); }
.text-red    { color: var(--red); }
.fw-bold     { font-weight: bold; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.p-15  { padding: 15px; }
.p-20  { padding: 20px; }
.px-15 { padding-left: 15px; padding-right: 15px; }

/* ===== PWA SAFE AREAS ===== */
@supports (padding: max(0px)) {
  .bottom-nav {
    padding-bottom: max(0px, env(safe-area-inset-bottom));
    height: calc(var(--b-nav) + max(0px, env(safe-area-inset-bottom)));
  }
  .page-body {
    padding-bottom: calc(var(--b-nav) + max(0px, env(safe-area-inset-bottom)) + 10px);
  }
}

/* ===== DESKTOP SHADOW ===== */
@media (min-width: 431px) {
  .app-shell { box-shadow: 0 0 40px rgba(0,0,0,0.12); }
  .bottom-nav { box-shadow: 0 -2px 10px rgba(0,0,0,0.08); }
}
