:root {
    --chabok-orange: #ed510b;
    --chabok-orange-dark: #c83d06;
    --chabok-ink: #14201f;
    --chabok-muted: #71807d;
    --chabok-surface: #ffffff;
    --chabok-canvas: #f6f8f7;
    --chabok-line: #e7eeeb;
    --chabok-green: #138a61;
    --chabok-radius: 22px;
}

* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
html { background: var(--chabok-canvas); }
body { color: var(--chabok-ink); background: var(--chabok-canvas) !important; }
a { text-decoration: none; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, a { transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease; }
a:active, button:active { transform: scale(.98); }

.chabok-app { max-width: 1180px; margin: 0 auto; padding: 20px 20px 112px; }
.chabok-mobile-shell { max-width: 520px; margin: 0 auto; }
.chabok-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.chabok-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--chabok-ink); font-weight: 800; }
.chabok-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: var(--chabok-orange); box-shadow: 0 8px 18px rgba(237,81,11,.22); }
.chabok-kicker { color: var(--chabok-muted); font-size: 12px; }
.chabok-avatar { width: 42px; height: 42px; display: grid; place-items: center; color: var(--chabok-orange); background: #fff1ea; border-radius: 15px; font-weight: 800; overflow: hidden; }
.chabok-icon-button { width: 42px; height: 42px; display: grid; place-items: center; color: var(--chabok-muted); background: #fff; border: 1px solid var(--chabok-line); border-radius: 15px; }
.chabok-icon-button:hover { color: var(--chabok-orange); border-color: #ffd4c2; }
.chabok-balance-icon { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.16); border-radius: 11px; }

.chabok-balance { position: relative; overflow: hidden; min-height: 220px; padding: 25px; color: #fff; border-radius: 28px; background: linear-gradient(140deg, #ed510b 0%, #f47731 52%, #ff9c5b 100%); box-shadow: 0 18px 38px rgba(237,81,11,.22); }
.chabok-balance:after { content: ''; position: absolute; width: 220px; height: 220px; left: -72px; bottom: -128px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; box-shadow: 0 0 0 24px rgba(255,255,255,.05), 0 0 0 48px rgba(255,255,255,.04); }
.chabok-balance-content { position: relative; z-index: 1; }
.chabok-balance-label { color: rgba(255,255,255,.76); font-size: 12px; }
.chabok-balance-value { margin-top: 18px; font-size: clamp(30px, 8vw, 48px); line-height: 1; font-weight: 800; letter-spacing: -1px; }
.chabok-balance-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 30px; color: rgba(255,255,255,.84); font-size: 12px; }
.chabok-wallet-code { direction: ltr; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 1px; }

/* ---- Virtual card (Visa/Mastercard-style) dashboard balance card ---- */
.chabok-card { aspect-ratio: 1.586 / 1; min-height: 210px; display: flex; }
.chabok-card.chabok-card-tall { aspect-ratio: auto; }
.chabok-card:before { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 140% at 100% 0%, rgba(255,255,255,.16), transparent 60%); pointer-events: none; }
.chabok-card .chabok-balance-content { display: flex; flex-direction: column; height: 100%; }
.chabok-card-top { display: flex; align-items: center; justify-content: space-between; }
.chabok-card-chip { display: grid; place-items: center; width: 42px; height: 32px; color: rgba(255,255,255,.92); background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); border-radius: 8px; }
.chabok-card-contactless { color: rgba(255,255,255,.85); transform: rotate(90deg); }
.chabok-balance-label-row { margin-top: 14px; }
.chabok-card .chabok-balance-value { margin-top: 4px; font-size: clamp(24px, 6vw, 34px); }
.chabok-card-number-row { margin-top: auto; }
.chabok-card-number-label { color: rgba(255,255,255,.7); font-size: 10.5px; }
.chabok-card-number { margin-top: 4px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: clamp(15px, 3.6vw, 19px); font-weight: 700; letter-spacing: 2px; }
.chabok-card-bottom-row { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 16px; }
.chabok-card-holder-label { color: rgba(255,255,255,.7); font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; }
.chabok-card-holder-name { margin-top: 3px; font-size: 13px; font-weight: 700; letter-spacing: .5px; }
.chabok-card-network { position: relative; width: 46px; height: 30px; flex: 0 0 auto; }
.chabok-card-network span { position: absolute; top: 0; width: 26px; height: 26px; border-radius: 50%; opacity: .88; }
.chabok-card-network span:first-child { left: 0; background: #ffd166; }
.chabok-card-network span:last-child { left: 15px; background: #ff5f6d; mix-blend-mode: multiply; }

.chabok-section-head { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 13px; }
.chabok-section-title { font-size: 17px; font-weight: 800; }
.chabok-link { color: var(--chabok-orange); font-size: 12px; font-weight: 700; }
.chabok-back { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 16px; color: var(--chabok-muted); font-size: 12px; font-weight: 700; }
.chabok-back:hover { color: var(--chabok-orange); }
.chabok-back-icon { width: 28px; height: 28px; display: grid; place-items: center; color: var(--chabok-orange); border: 1px solid #ffd4c2; border-radius: 10px; }
.chabok-settings-card { padding: 18px; margin-bottom: 14px; background: #fff; border: 1px solid var(--chabok-line); border-radius: 22px; box-shadow: 0 7px 22px rgba(25,53,45,.05); }
.chabok-settings-title { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; font-weight: 800; }
.chabok-settings-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--chabok-orange); background: #fff1ea; border-radius: 13px; }
.chabok-form-input { width: 100%; border: 1px solid var(--chabok-line); border-radius: 14px; padding: 13px 14px; outline: 0; background: #fbfcfb; transition: border-color .18s ease, box-shadow .18s ease; }
.chabok-form-input:focus { border-color: #f5a17d; box-shadow: 0 0 0 4px rgba(237,81,11,.1); }
.chabok-primary-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 13px; color: #fff; border: 0; border-radius: 14px; background: var(--chabok-orange); font-weight: 800; box-shadow: 0 9px 20px rgba(237,81,11,.16); cursor: pointer; }
.chabok-secondary-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 13px; color: var(--chabok-ink); border: 1px solid var(--chabok-line); border-radius: 14px; background: #f7f9f8; font-weight: 800; }
.chabok-danger-button { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; padding: 13px; color: #c44539; border: 1px solid #ffd8d3; border-radius: 14px; background: #fff3f1; font-weight: 800; }
.chabok-settings-page { width: 100%; max-width: 520px; margin: 0 auto; }
.chabok-page-title { margin: 0 0 10px; color: var(--chabok-ink); font-size: 24px; line-height: 1.3; font-weight: 800; }
.chabok-alert { padding: 12px 14px; margin-bottom: 12px; border-radius: 14px; font-size: 12px; }
.chabok-alert.is-success { color: #126746; background: #eaf8f1; border: 1px solid #c9edda; }
.chabok-alert.is-error { color: #a33e35; background: #fff0ee; border: 1px solid #ffd1cb; }
.chabok-form { display: grid; gap: 12px; }
.chabok-actions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.chabok-action { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 13px 7px; color: var(--chabok-ink); background: var(--chabok-surface); border: 1px solid var(--chabok-line); border-radius: 18px; font-size: 11px; font-weight: 700; box-shadow: 0 7px 22px rgba(25,53,45,.05); }
.chabok-action:hover { border-color: #ffc7ad; box-shadow: 0 10px 26px rgba(237,81,11,.12); }
.chabok-action-icon { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; color: var(--chabok-orange); background: #fff1ea; border-radius: 13px; }
.chabok-action-icon.is-green { color: var(--chabok-green); background: #eaf8f1; }
.chabok-action-icon.is-blue { color: #2563a8; background: #eaf3fc; }
.chabok-action-icon.is-ink { color: var(--chabok-ink); background: #eef1f0; }
.chabok-action-icon.is-amber { color: #a3620a; background: #fff4e5; }
.chabok-empty-icon { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 10px; color: var(--chabok-muted); background: #f2f4f3; border-radius: 14px; }
.chabok-hint-panel { margin-top: 14px; background: #fff8f4; border-color: #ffe2d3; }

/* ---- Real SVG icon system (includes/icons.php) --------------------- */
.chabok-icon { width: 20px; height: 20px; display: block; color: currentColor; }
.chabok-icon-sm { width: 16px; height: 16px; }
.chabok-icon-md { width: 20px; height: 20px; }
.chabok-icon-lg { width: 24px; height: 24px; }
.chabok-icon-xl { width: 30px; height: 30px; }

.chabok-panel { background: var(--chabok-surface); border: 1px solid var(--chabok-line); border-radius: var(--chabok-radius); box-shadow: 0 7px 22px rgba(25,53,45,.05); }
.chabok-panel-pad { padding: 18px; }
.chabok-transaction { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--chabok-line); }
.chabok-transaction-end { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.chabok-transaction-receipt-link { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; color: var(--chabok-muted); background: var(--chabok-canvas); border-radius: 9px; }
.chabok-transaction-receipt-link:hover { color: var(--chabok-orange); }
.chabok-transaction:last-child { border-bottom: 0; padding-bottom: 0; }
.chabok-transaction:first-child { padding-top: 0; }
.chabok-transaction-main { min-width: 0; display: flex; align-items: center; gap: 11px; }
.chabok-transaction-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; background: #eef8f3; color: var(--chabok-green); }
.chabok-transaction-icon.is-send { color: #d44a38; background: #fff0ee; }
.chabok-transaction-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; }
.chabok-transaction-date { margin-top: 3px; color: var(--chabok-muted); font-size: 10px; }
.chabok-transaction-amount { direction: ltr; white-space: nowrap; font-size: 13px; font-weight: 800; }
.chabok-positive { color: var(--chabok-green); }
.chabok-negative { color: #d44a38; }

.chabok-bottom-nav { position: fixed; z-index: 20; right: 0; bottom: 0; left: 0; display: flex; justify-content: center; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.9); border-top: 1px solid var(--chabok-line); backdrop-filter: blur(16px); }
.chabok-bottom-nav-inner { width: min(520px, 100%); display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.chabok-nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; color: var(--chabok-muted); font-size: 10px; font-weight: 700; border-radius: 13px; }
.chabok-nav-item.is-active { color: var(--chabok-orange); background: #fff1ea; }
.chabok-nav-icon { font-size: 18px; line-height: 1; }

.chabok-empty { padding: 26px 12px; color: var(--chabok-muted); text-align: center; font-size: 12px; }
.chabok-qr-frame { display: flex; align-items: center; justify-content: center; width: 100%; padding: 14px; margin: 0 auto; background: #fff; border: 1px solid var(--chabok-line); border-radius: 18px; }
.chabok-qr-canvas { display: flex; align-items: center; justify-content: center; width: 220px; height: 220px; }
.chabok-qr-canvas img, .chabok-qr-canvas canvas, .chabok-qr-canvas table { display: block; margin: 0 auto; border-radius: 12px; }
.chabok-qr-fallback { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 220px; padding: 20px 12px; color: var(--chabok-muted); font-size: 12px; text-align: center; }
.chabok-status-pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.chabok-status-pill.is-success { color: #126746; background: #eaf8f1; }
.chabok-status-pill.is-warning { color: #a3620a; background: #fff4e5; }
.chabok-status-pill.is-danger { color: #a33e35; background: #fff0ee; }
.chabok-status-pill.is-muted { color: var(--chabok-muted); background: #f2f4f3; }
button.chabok-secondary-button { cursor: pointer; }
.chabok-notice-panel { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; margin-bottom: 16px; color: #a3620a; background: #fff8ec; border: 1px solid #ffe4b3; border-radius: 16px; font-size: 12px; line-height: 1.7; }
.chabok-notice-icon { flex: 0 0 auto; color: #d68a1a; }

.chabok-scanner { position: relative; overflow: hidden; aspect-ratio: 1 / 1; background: #0e1615; border-radius: 18px; }
.chabok-scanner-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chabok-scanner-canvas { display: none; }
.chabok-scanner-placeholder { position: absolute; inset: 0; display: grid; place-items: center; background: #0e1615; color: #6b7a78; }
.chabok-scanner-frame { position: absolute; inset: 14%; pointer-events: none; }
.chabok-scanner-corner { position: absolute; width: 26px; height: 26px; border-color: var(--chabok-orange); }
.chabok-scanner-corner.is-tl { top: 0; left: 0; border-top: 3px solid; border-left: 3px solid; border-radius: 8px 0 0 0; }
.chabok-scanner-corner.is-tr { top: 0; right: 0; border-top: 3px solid; border-right: 3px solid; border-radius: 0 8px 0 0; }
.chabok-scanner-corner.is-bl { bottom: 0; left: 0; border-bottom: 3px solid; border-left: 3px solid; border-radius: 0 0 0 8px; }
.chabok-scanner-corner.is-br { bottom: 0; right: 0; border-bottom: 3px solid; border-right: 3px solid; border-radius: 0 0 8px 0; }
.chabok-scanner-status { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 11px 13px; color: var(--chabok-muted); background: #f7f9f8; border-radius: 13px; font-size: 12px; }
.chabok-scanner-status.is-success { color: #126746; background: #eaf8f1; }
.chabok-scanner-status.is-error { color: #a33e35; background: #fff0ee; }
.chabok-scanner-status-icon { flex: 0 0 auto; display: grid; place-items: center; }
#qrRetryButton { margin-top: 10px; }
.chabok-manual-entry { margin-top: 14px; }
.chabok-install { display: none; }
.chabok-install-banner { position: fixed; z-index: 50; right: 14px; bottom: 88px; left: 14px; display: flex; align-items: center; gap: 10px; max-width: 520px; margin: auto; padding: 11px 12px; background: rgba(255,255,255,.96); border: 1px solid #ffd4c2; border-radius: 18px; box-shadow: 0 14px 34px rgba(20,32,31,.16); backdrop-filter: blur(14px); }
.chabok-install-banner[hidden] { display: none; }
.chabok-install-copy { min-width: 0; display: flex; align-items: center; gap: 9px; flex: 1; }
.chabok-install-copy strong, .chabok-install-copy small { display: block; }
.chabok-install-copy strong { font-size: 12px; }
.chabok-install-copy small { margin-top: 3px; color: var(--chabok-muted); font-size: 10px; }
.chabok-install-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; color: var(--chabok-orange); background: #fff1ea; border-radius: 11px; }
.chabok-install-button { padding: 8px 13px; color: #fff; border: 0; border-radius: 10px; background: var(--chabok-orange); font-size: 11px; font-weight: 800; }
.chabok-install-close { display: grid; place-items: center; padding: 4px; color: var(--chabok-muted); border: 0; background: transparent; }
.chabok-update-banner { border-color: #bfe0d3; background: rgba(234,248,241,.97); }
.chabok-update-banner .chabok-install-icon { color: var(--chabok-green); background: #e0f5ea; }

/* ---- Hard-refresh corner button -------------------------------------
   Always-visible (not a dismissable banner like the install/update ones
   above) — for a user stuck on a stale cached build who wants to force a
   full reload without waiting for the automatic update-detection flow. */
.chabok-hard-refresh-button { position: fixed; z-index: 55; left: 14px; bottom: 88px; display: grid; place-items: center; width: 46px; height: 46px; color: var(--chabok-muted); background: rgba(255,255,255,.96); border: 1px solid var(--chabok-line); border-radius: 15px; box-shadow: 0 10px 24px rgba(20,32,31,.14); backdrop-filter: blur(14px); cursor: pointer; }
.chabok-hard-refresh-button:hover { color: var(--chabok-orange); border-color: #ffd4c2; }
.chabok-hard-refresh-button.is-spinning .chabok-icon { animation: chabok-spin .8s linear infinite; }
@keyframes chabok-spin { to { transform: rotate(360deg); } }
@media (min-width: 760px) { .chabok-hard-refresh-button { bottom: 24px; left: 24px; } }
.chabok-public { width: 100%; max-width: 1160px; padding-top: 24px; }
.chabok-public-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 58px; }
.chabok-public-links { display: flex; align-items: center; gap: 12px; }
.chabok-public-link { padding: 11px 16px; color: var(--chabok-ink); border: 1px solid var(--chabok-line); border-radius: 13px; font-size: 12px; font-weight: 800; background: #fff; }
.chabok-public-link.is-primary { color: #fff; border-color: var(--chabok-orange); background: var(--chabok-orange); box-shadow: 0 8px 20px rgba(237,81,11,.18); }
.chabok-hero { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(24px, 6vw, 70px); align-items: center; }
.chabok-hero-copy { max-width: 540px; }
.chabok-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; color: var(--chabok-orange); background: #fff1ea; border-radius: 999px; font-size: 11px; font-weight: 800; }
.chabok-eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--chabok-orange); box-shadow: 0 0 0 5px rgba(237,81,11,.12); }
.chabok-hero-title { margin: 20px 0 16px; font-size: clamp(38px, 5vw, 70px); line-height: 1.08; letter-spacing: -1px; font-weight: 800; }
.chabok-hero-title strong { color: var(--chabok-orange); }
.chabok-hero-text { max-width: 470px; color: var(--chabok-muted); font-size: 16px; line-height: 2; }
.chabok-hero-actions { display: flex; align-items: center; gap: 12px; margin-top: 28px; }
.chabok-hero-button { display: inline-flex; align-items: center; gap: 8px; padding: 14px 18px; color: #fff; background: var(--chabok-orange); border-radius: 15px; font-size: 13px; font-weight: 800; box-shadow: 0 12px 25px rgba(237,81,11,.2); }
.chabok-hero-button .chabok-icon { transform: scaleX(-1); }
html[dir="rtl"] .chabok-hero-button .chabok-icon { transform: none; }
.chabok-hero-button:hover { box-shadow: 0 16px 30px rgba(237,81,11,.28); transform: translateY(-2px); }
.chabok-hero-button.is-quiet { color: var(--chabok-ink); background: transparent; box-shadow: none; }
.chabok-trust-row { display: flex; gap: 22px; margin-top: 38px; color: var(--chabok-muted); font-size: 11px; }
.chabok-trust-item { display: flex; align-items: center; gap: 7px; }
.chabok-trust-icon { color: var(--chabok-green); font-size: 16px; }
.chabok-transfer-stage { position: relative; width: 100%; min-height: clamp(360px, 42vw, 480px); display: grid; place-items: center; }
.chabok-transfer-glow { position: absolute; width: 360px; height: 360px; border-radius: 50%; background: rgba(237,81,11,.09); filter: blur(1px); }
.chabok-transfer-orbit { position: absolute; width: min(420px, 86%); height: min(250px, 52%); border: 1px solid rgba(237,81,11,.16); border-radius: 50%; transform: rotate(-17deg); }
.chabok-transfer-orbit:after { content: ''; position: absolute; inset: 23px -18px; border: 1px dashed rgba(237,81,11,.22); border-radius: 50%; }
.chabok-phone { position: absolute; z-index: 2; width: clamp(112px, 14vw, 148px); height: clamp(208px, 26vw, 272px); padding: clamp(7px, 1vw, 10px); border: clamp(5px, .6vw, 7px) solid #162321; border-radius: 26px; background: #fff; box-shadow: 0 25px 45px rgba(20,32,31,.18); }
.chabok-phone.is-left { left: clamp(0%, 3vw, 3%); top: 26%; transform: rotate(-9deg); }
.chabok-phone.is-right { right: clamp(0%, 3vw, 3%); top: 26%; transform: rotate(9deg); }
.chabok-phone-notch { width: 44px; height: 9px; margin: 1px auto 13px; border-radius: 0 0 9px 9px; background: #162321; }
.chabok-phone-screen { height: calc(100% - 31px); padding: clamp(8px, 1.2vw, 12px) clamp(6px, 1vw, 9px); border-radius: 15px; background: #f7f8f7; }
.chabok-phone-header { display: flex; justify-content: space-between; color: var(--chabok-muted); font-size: 8px; }
.chabok-phone-balance { margin-top: 15px; padding: 12px 8px; color: #fff; border-radius: 12px; background: var(--chabok-orange); font-size: clamp(7px, .8vw, 9px); }
.chabok-phone-balance strong { display: block; margin-top: 5px; font-size: clamp(11px, 1.3vw, 16px); }
.chabok-phone-line { height: 7px; margin-top: 11px; border-radius: 5px; background: #e5ebe8; }
.chabok-phone-line.is-short { width: 62%; }
.chabok-transfer-path { position: absolute; z-index: 3; width: min(225px, 46%); height: 3px; background: rgba(237,81,11,.18); transform: rotate(-4deg); }
.chabok-transfer-path:before, .chabok-transfer-path:after { content: ''; position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--chabok-orange); transform: translateY(-50%); box-shadow: 0 0 0 7px rgba(237,81,11,.1); }
.chabok-transfer-path:before { left: 12%; animation: chabok-send 2.3s ease-in-out infinite; }
.chabok-transfer-path:after { right: 12%; opacity: .28; }
.chabok-transfer-wallet { position: relative; z-index: 4; width: clamp(82px, 10vw, 112px); height: clamp(82px, 10vw, 112px); display: grid; place-items: center; color: #fff; border: clamp(6px, .8vw, 9px) solid #fff; border-radius: 34px; background: var(--chabok-orange); box-shadow: 0 17px 30px rgba(237,81,11,.28); animation: chabok-float 4s ease-in-out infinite; }
.chabok-transfer-wallet .chabok-icon { width: clamp(32px, 4vw, 45px); height: clamp(32px, 4vw, 45px); }
.chabok-transfer-label { position: absolute; z-index: 5; bottom: 23%; display: flex; align-items: center; gap: 6px; padding: 9px 14px; color: var(--chabok-ink); background: rgba(255,255,255,.92); border: 1px solid var(--chabok-line); border-radius: 12px; box-shadow: 0 10px 25px rgba(25,53,45,.08); font-size: 11px; font-weight: 800; }
.chabok-transfer-label .chabok-icon { color: var(--chabok-green); }
.chabok-public-footer { display: flex; justify-content: space-between; margin-top: 60px; padding-top: 18px; color: var(--chabok-muted); border-top: 1px solid var(--chabok-line); font-size: 11px; }
@keyframes chabok-send { 0%, 100% { left: 12%; opacity: .35; } 50% { left: 82%; opacity: 1; } }
@keyframes chabok-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (max-width: 780px) {
    .chabok-public { padding-top: 16px; }
    .chabok-public-nav { margin-bottom: 32px; }
    .chabok-public-links { gap: 5px; }
    .chabok-public-link { padding: 9px 11px; font-size: 11px; }
    .chabok-hero { display: flex; flex-direction: column; gap: 16px; }
    .chabok-hero-copy { text-align: center; }
    .chabok-hero-text { margin: 0 auto; font-size: 14px; }
    .chabok-hero-actions, .chabok-trust-row { justify-content: center; }
    .chabok-transfer-stage { min-height: 360px; margin: -15px 0 -25px; }
    .chabok-public-footer { margin-top: 25px; }
}
@media (max-width: 430px) {
    .chabok-app { padding-right: 14px; padding-left: 14px; }
    .chabok-public-nav { align-items: flex-start; }
    .chabok-brand { gap: 7px; font-size: 13px; }
    .chabok-mark { width: 34px; height: 34px; }
    .chabok-public-links { flex-shrink: 0; }
    .chabok-hero-title { font-size: clamp(34px, 11vw, 46px); }
    .chabok-hero-actions { flex-direction: column; width: 100%; }
    .chabok-hero-button { width: min(260px, 100%); justify-content: center; }
    .chabok-trust-row { flex-wrap: wrap; gap: 10px 16px; }
    .chabok-transfer-stage { min-height: 300px; }
    .chabok-phone { width: 108px; height: 198px; }
    .chabok-phone-screen { height: calc(100% - 27px); }
    .chabok-phone-balance { margin-top: 10px; padding: 9px 6px; }
    .chabok-transfer-label { bottom: 16%; font-size: 10px; }
}
@media (max-height: 520px) and (orientation: landscape) {
    .chabok-public-nav { margin-bottom: 20px; }
    .chabok-hero { grid-template-columns: 1fr 1fr; gap: 24px; }
    .chabok-hero-title { font-size: 36px; margin-top: 12px; }
    .chabok-hero-text { font-size: 12px; line-height: 1.6; }
    .chabok-trust-row { margin-top: 14px; }
    .chabok-transfer-stage { min-height: 270px; }
}
@media (min-width: 760px) {
    .chabok-app { padding-top: 32px; }
    .chabok-mobile-shell { max-width: 760px; }
    .chabok-dashboard-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; align-items: start; }
    .chabok-bottom-nav { position: static; margin: 24px auto 0; padding: 0; background: transparent; border: 0; backdrop-filter: none; }
    .chabok-bottom-nav-inner { max-width: 520px; padding: 5px; background: #fff; border: 1px solid var(--chabok-line); border-radius: 18px; }
}
@media (max-width: 420px) { .chabok-actions { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 360px) { .chabok-actions { gap: 6px; } .chabok-action { font-size: 10px; } }


/* ---- Receipt view (receipt.php) ------------------------------------ */
.chabok-receipt-card { overflow: hidden; background: var(--chabok-surface); border: 1px solid var(--chabok-line); border-radius: var(--chabok-radius); box-shadow: 0 7px 22px rgba(25,53,45,.05); }
.chabok-receipt-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; color: #fff; background: linear-gradient(140deg, #ed510b 0%, #f47731 100%); }
.chabok-receipt-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; }
.chabok-receipt-header .chabok-status-pill { background: rgba(255,255,255,.22); color: #fff; }
.chabok-receipt-amount { padding: 22px 20px 14px; text-align: center; border-bottom: 1px solid var(--chabok-line); }
.chabok-receipt-amount-value { margin-top: 6px; font-size: 30px; font-weight: 800; }
.chabok-receipt-amount-value small { font-size: 14px; font-weight: 600; color: var(--chabok-muted); }
.chabok-receipt-rows { padding: 6px 20px; }
.chabok-receipt-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--chabok-line); font-size: 13px; }
.chabok-receipt-row:last-child { border-bottom: 0; }
.chabok-receipt-row > span:first-child { flex: 0 0 auto; color: var(--chabok-muted); }
.chabok-receipt-row > span:last-child { text-align: left; font-weight: 700; }
.chabok-receipt-footer { padding: 14px 20px; color: var(--chabok-muted); background: var(--chabok-canvas); border-top: 1px solid var(--chabok-line); font-size: 11px; text-align: center; }
.chabok-receipt-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
@media (max-width: 460px) { .chabok-receipt-actions { grid-template-columns: 1fr 1fr; } .chabok-receipt-actions .chabok-primary-button { grid-column: 1 / -1; } }

/* ---- Pickup-code box (hawala vouchers: hawala_send.php / agent_hawala.php)
   Distinct, oversized treatment for the one piece of information that
   must be read aloud/copied/printed and handed to the other party —
   deliberately louder than a regular chabok-hint-panel row. ------------ */
/* ---- Redesigned "Payment Receipt" style receipt page ----
   Kept compact on purpose: most users screenshot this screen right after
   a transaction, so it should fit one phone viewport without scrolling
   rather than read like a full printable statement. */
.chabok-receipt-v2-header { padding: 16px 18px 10px; text-align: center; }
.chabok-receipt-v2-mark { display: grid; place-items: center; width: 40px; height: 40px; margin: 0 auto 8px; color: var(--chabok-orange); background: #fff1ea; border-radius: 50%; }
.chabok-receipt-v2-title { font-size: 15px; font-weight: 800; }
.chabok-receipt-v2-date { margin-top: 2px; font-size: 11px; color: var(--chabok-muted); }
.chabok-receipt-v2-divider { border-top: 1.5px dashed var(--chabok-line); margin: 0 18px; }
.chabok-receipt-v2-grid { display: grid; grid-template-columns: 1fr 1fr; padding: 0; }
.chabok-receipt-v2-cell { display: flex; align-items: flex-start; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--chabok-line); min-width: 0; }
.chabok-receipt-v2-cell.full { grid-column: 1 / -1; }
.chabok-receipt-v2-icon { flex: 0 0 auto; display: grid; place-items: center; width: 24px; height: 24px; color: var(--chabok-muted); background: var(--chabok-canvas); border-radius: 50%; }
.chabok-receipt-v2-icon svg { width: 13px; height: 13px; }
.chabok-receipt-v2-label { font-size: 10px; color: var(--chabok-muted); line-height: 1.3; }
.chabok-receipt-v2-value { margin-top: 1px; font-size: 12px; font-weight: 700; color: var(--chabok-ink); line-height: 1.3; overflow-wrap: anywhere; }
.chabok-receipt-v2-value small { display: block; margin-top: 1px; font-size: 10px; font-weight: 500; color: var(--chabok-muted); }
.chabok-receipt-v2-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 14px; }
.chabok-receipt-v2-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 10px 8px; text-align: center; border: 1px solid var(--chabok-line); border-radius: 14px; min-height: 0; }
.chabok-receipt-v2-panel .text-sm { font-size: 11px; line-height: 1.3; }
.chabok-receipt-v2-thanks-icon { display: grid; place-items: center; width: 24px; height: 24px; color: #fff; background: var(--chabok-green); border-radius: 50%; }
.chabok-receipt-v2-thanks-icon svg { width: 13px; height: 13px; }
.chabok-receipt-v2-qr canvas, .chabok-receipt-v2-qr img { max-width: 84px; height: auto; }
.chabok-receipt-v2-tracking { padding: 0 14px 10px; text-align: center; font-size: 10px; color: var(--chabok-muted); word-break: break-all; }
.chabok-receipt-v2 .chabok-receipt-footer { padding: 8px 14px; font-size: 10px; }

.chabok-receipt-pickup-box { margin: 0 20px 20px; padding: 16px; text-align: center; background: #fff8f4; border: 1px solid #ffe2d3; border-radius: 16px; }
.chabok-receipt-pickup-code { margin-top: 6px; font-size: 30px; font-weight: 800; letter-spacing: 6px; color: var(--chabok-orange-dark); }

/* Utility: hide an element only in print output (used to drop on-screen-only
   status alerts/chrome from a printed voucher/receipt without touching the
   existing, already-relied-upon print rules below). */
.chabok-print-hide { }

@media print {
    .chabok-bottom-nav, .chabok-back, .chabok-receipt-actions, .chabok-install-banner, .chabok-print-hide,
    .chabok-alert, .chabok-hard-refresh-button { display: none !important; }
    body { background: #fff !important; }
    /* box-shadow never prints; a real border keeps the card's edges legible
       on paper. Browsers strip background colors from print by default
       unless explicitly told to keep them — without this, the branded
       orange header would print as plain white, hiding the amount text
       that's colored white-on-orange for on-screen contrast. */
    .chabok-receipt-card { box-shadow: none !important; border: 1.5px solid #14201f !important; }
    .chabok-receipt-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .chabok-receipt-pickup-box { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}


/* ---- File upload control (add_money.php receipt photo) ------------- */
.chabok-file-drop { position: relative; margin-top: 4px; }
.chabok-file-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.chabok-file-label { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; color: var(--chabok-muted); background: #fbfcfb; border: 1.5px dashed var(--chabok-line); border-radius: 14px; font-size: 12.5px; font-weight: 600; text-align: center; }
.chabok-file-drop:hover .chabok-file-label { border-color: #ffc7ad; color: var(--chabok-orange); }


/* ---- P2P exchange market (exchange_market.php) ---------------------- */
.chabok-tabs { display: flex; gap: 6px; margin-bottom: 16px; padding: 4px; background: var(--chabok-canvas); border-radius: 14px; }
.chabok-tab { flex: 1; padding: 10px; color: var(--chabok-muted); background: transparent; border: 0; border-radius: 11px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.chabok-tab.is-active { color: var(--chabok-ink); background: #fff; box-shadow: 0 4px 10px rgba(25,53,45,.08); }
.chabok-p2p-card { margin-bottom: 12px; }
.chabok-p2p-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.chabok-p2p-card-body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.chabok-modal-overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(20,32,31,.5); }
.chabok-modal-overlay[hidden] { display: none; }
.chabok-modal { width: 100%; max-width: 360px; padding: 22px; background: #fff; border-radius: 22px; box-shadow: 0 30px 60px rgba(0,0,0,.25); }
@media (max-width: 420px) { .chabok-p2p-card-body { grid-template-columns: 1fr 1fr; } }

/* ---- P2P market: unit-labeled summaries & live previews ---- */
.chabok-p2p-preview { padding: 12px 14px; font-size: 13px; line-height: 1.9; color: var(--chabok-muted); background: var(--chabok-canvas); border: 1px dashed var(--chabok-line); border-radius: 14px; }
.chabok-p2p-preview.is-ok { color: var(--chabok-ink); background: #f3fbf7; border: 1px solid #cfeadd; }
.chabok-p2p-preview.is-error { color: #a33e35; background: #fff4f2; border: 1px solid #f6d3cd; }
.chabok-p2p-preview b { font-weight: 800; }
.chabok-p2p-accept-line { margin: 4px 0 10px; padding: 8px 12px; font-size: 12.5px; line-height: 1.9; background: var(--chabok-canvas); border-radius: 12px; }
