/* Paycoi – phần mở rộng ví 11/2026: chuyển/nhận điểm QR, menu, nút thông minh, chân trang.
   Dùng chung bảng màu sơn mài của app.css. */

/* ---------- Đầu trang con ---------- */
.vi-head { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 8px; margin: 2px 0 16px; }
.vi-head h1 { font-size: 28px; text-align: center; }
.vi-back, .vi-icbtn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--shell);
  background: rgba(42, 20, 17, .6); border: 1px solid var(--line); cursor: pointer; padding: 0; font: inherit; }
.vi-back:hover, .vi-icbtn:hover { border-color: var(--line-2); text-decoration: none; }
.vi-icbtn .ic { color: var(--gold); }
.topbar .top-menu { width: 34px; height: 34px; border-radius: 50%; }
@media (max-width: 719px) { .topbar .top-menu { display: none; } }

/* ---------- Thẻ ví: ẩn/hiện số dư, chép mã ---------- */
.bal-row { display: flex; align-items: baseline; gap: 2px; }
.eye { margin-left: auto; align-self: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(239, 228, 206, .16);
  background: rgba(18, 7, 6, .3); color: var(--shell-2); display: grid; place-items: center; cursor: pointer; padding: 0; }
.eye .off { display: none; }
.masked .eye .on { display: none; }
.masked .eye .off { display: inline; }
.masked [data-bal] { letter-spacing: .12em; }
.code-btn { appearance: none; background: none; border: 0; padding: 4px 0; font: inherit; font-size: 12px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px; color: var(--shell-2); }
.code-btn .ic { opacity: .7; }
.code-btn.done { color: var(--jade); }

/* ---------- 8 nút nhanh ---------- */
.quick.q8 { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick.q8 a { font-size: 11.5px; line-height: 1.25; padding: 12px 2px 10px; min-height: 76px; justify-content: flex-start; }
.quick.q8 a.hot { background: linear-gradient(180deg, rgba(90, 29, 20, .85), rgba(42, 20, 17, .75)); border-color: rgba(217, 174, 82, .22); color: var(--shell); }
.quick.q8 a.hot .ic { color: var(--gold-hi); }
@media (max-width: 360px) { .quick.q8 a { font-size: 10.5px; } }

/* ---------- Gợi ý thông minh ---------- */
.smart { display: flex; gap: 8px; overflow-x: auto; margin: 14px calc(-1 * var(--gutter)) 0; padding: 2px var(--gutter) 4px;
  scrollbar-width: none; scroll-snap-type: x proximity; }
.smart::-webkit-scrollbar { display: none; }
.smart-chip { flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 7px; max-width: 260px;
  font-size: 13px; padding: 9px 13px; border-radius: 999px; color: var(--shell); background: rgba(217, 174, 82, .08);
  border: 1px solid rgba(217, 174, 82, .25); }
.smart-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smart-chip .ic { color: var(--gold); }
.smart-chip:hover { text-decoration: none; border-color: var(--gold); }
.smart-chip.red { background: rgba(181, 64, 42, .14); border-color: rgba(181, 64, 42, .45); }
.smart-chip.red .ic { color: #e98a74; }

/* ---------- Danh bạ chuyển nhanh ---------- */
.fast { margin-top: 14px; padding-bottom: 14px; }
.recent { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.recent::-webkit-scrollbar { display: none; }
.rc { flex: none; width: 64px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--shell-2);
  font: 12px/1.2 var(--sans); background: none; border: 0; padding: 0; cursor: pointer; text-align: center; }
.rc:hover { text-decoration: none; color: var(--shell); }
.rc .avatar { width: 48px; height: 48px; font-size: 15px; border-color: rgba(217, 174, 82, .35); }
.rc .avatar.add { background: transparent; border-style: dashed; color: var(--gold); }
.rc .nm { width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.avatar.lg { width: 46px; height: 46px; font-size: 16px; flex: none; border-color: rgba(217, 174, 82, .4); }

/* ---------- Chuyển điểm ---------- */
.xfer .panel + .panel { margin-top: 12px; }
.xf-lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--shell-3); margin-bottom: 10px; }
.inp-row { display: flex; gap: 8px; }
.inp-row input { flex: 1; min-width: 0; letter-spacing: .03em; }
.btn-sq { width: 52px; min-height: 52px; padding: 0; flex: none; border-radius: var(--r-md); }
.btn-sq .ic { color: var(--gold); }
.xf-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.chipbtn { display: inline-flex; align-items: center; gap: 6px; font: 500 13px/1 var(--sans); color: var(--shell-2); cursor: pointer;
  padding: 9px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(18, 7, 6, .35); text-decoration: none; }
.chipbtn:hover { border-color: var(--gold); color: var(--shell); text-decoration: none; }
.chipbtn .ic { color: var(--gold); }
.chipbtn.on { border-color: var(--gold); color: var(--gold-hi); background: rgba(217, 174, 82, .1); }

.who-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-md);
  background: rgba(134, 191, 163, .07); border: 1px solid rgba(134, 191, 163, .3); }
.who-card.flat { background: transparent; border: 0; padding: 0 0 12px; }
.who-card[hidden], [data-find][hidden] { display: none; }
.who-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.who-main b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-main small { font-size: 12px; color: var(--shell-3); }

.amt-wrap { display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 6px 0 2px; }
.amt-in { width: 3em; max-width: 78%; min-width: 1.4em; text-align: center; background: transparent !important; border: 0 !important; box-shadow: none !important;
  font: 600 44px/1.1 var(--serif) !important; color: var(--gold-hi) !important; padding: 4px 0 !important; }
.amt-in::placeholder { color: rgba(217, 174, 82, .35); }
.amt-unit { font: 500 18px var(--serif); color: var(--gold); }
.amt-wrap:focus-within { box-shadow: 0 1px 0 0 var(--gold); }
.qchips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.xf-go { margin-top: 16px; min-height: 56px; font-size: 16px; }
.xf-go[disabled] { filter: grayscale(.4); }
[data-amt-hint].bad { color: #f0a08c; }

.vi-cta { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding: 14px; border-radius: var(--r-lg);
  border: 1px dashed rgba(217, 174, 82, .35); color: var(--shell); }
.vi-cta:hover { text-decoration: none; border-color: var(--gold); }
.vi-cta .dot { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--lac-3); color: var(--gold); flex: none; }
.vi-cta > span:nth-child(2) { flex: 1; }
.vi-cta b { display: block; font-weight: 600; }
.vi-cta small { color: var(--shell-3); font-size: 12px; }
.vi-cta > .ic { color: var(--shell-3); }

/* ---------- Máy quét ---------- */
.scanner { position: fixed; inset: 0; z-index: 80; background: #000; color: #fff; }
.scanner[hidden] { display: none; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sc-mask { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.sc-frame { position: relative; width: min(72vw, 300px); aspect-ratio: 1; border-radius: 22px; box-shadow: 0 0 0 100vmax rgba(10, 4, 3, .62); }
.sc-frame i { position: absolute; width: 34px; height: 34px; border: 3px solid var(--gold-hi); }
.sc-frame i:nth-child(1) { left: -2px; top: -2px; border-right: 0; border-bottom: 0; border-radius: 20px 0 0 0; }
.sc-frame i:nth-child(2) { right: -2px; top: -2px; border-left: 0; border-bottom: 0; border-radius: 0 20px 0 0; }
.sc-frame i:nth-child(3) { left: -2px; bottom: -2px; border-right: 0; border-top: 0; border-radius: 0 0 0 20px; }
.sc-frame i:nth-child(4) { right: -2px; bottom: -2px; border-left: 0; border-top: 0; border-radius: 0 0 20px 0; }
.sc-line { position: absolute; left: 10%; right: 10%; top: 12%; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-hi), transparent); box-shadow: 0 0 14px var(--gold); animation: scanline 2.2s ease-in-out infinite; }
@keyframes scanline { 50% { top: 86%; } }
@media (prefers-reduced-motion: reduce) { .sc-line { animation: none; top: 50%; } }
.sc-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 16px 14px; font-weight: 600; }
.sc-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .45); color: #fff; display: grid; place-items: center; cursor: pointer; }
.sc-btn[hidden] { display: none; }
.sc-btn.on { background: var(--gold); color: var(--ink); }
.sc-bottom { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; padding: 18px 20px calc(26px + env(safe-area-inset-bottom)); }
.sc-bottom p { margin: 0 auto 14px; max-width: 30ch; font-size: 14px; color: rgba(255, 255, 255, .86); }
.sc-file { color: #fff; border-color: rgba(255, 255, 255, .4); background: rgba(0, 0, 0, .35); }
.scanner.found .sc-frame i { border-color: var(--jade); }

/* ---------- Nhận điểm ---------- */
.rcv-card { position: relative; border-radius: 26px; padding: 20px 18px 18px; text-align: center; color: var(--ink);
  background: linear-gradient(180deg, #fbf3e3, var(--paper)); box-shadow: 0 0 0 1px rgba(217, 174, 82, .5), 0 26px 50px -24px rgba(0, 0, 0, .9); }
.rcv-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; border-radius: 26px 26px 0 0; background: var(--gold-grad); }
.rcv-who { display: flex; align-items: center; gap: 12px; text-align: left; margin-bottom: 14px; }
.rcv-who .avatar { background: var(--lac-2); }
.rcv-who b { display: block; font: 600 20px/1.15 var(--serif); color: var(--ink); }
.rcv-who small { color: #7a5c48; font-size: 12px; letter-spacing: .04em; }
.rcv-qr { position: relative; width: 252px; height: 252px; margin: 0 auto; padding: 16px; background: #fff; border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(42, 18, 14, .08); }
.rcv-qr .qr-box, .rcv-qr .qr-box svg { width: 220px !important; height: 220px !important; display: block; }
.rcv-qr .qr-box svg path { fill: #1c0c0a; }
.rcv-logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #fff; border-radius: 50%; padding: 4px; line-height: 0; }
.rcv-amt { margin-top: 12px; font: 600 26px/1 var(--serif); color: #8a5a1a; }
.rcv-amt[hidden] { display: none; }
.rcv-hint { margin: 12px auto 0; max-width: 30ch; font-size: 13px; color: #6b4f3f; }
.rcv-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.tool { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 2px; border-radius: var(--r-md); cursor: pointer;
  background: rgba(42, 20, 17, .6); border: 1px solid var(--line); color: var(--shell-2); font: 500 11.5px/1.2 var(--sans); }
.tool .ic { color: var(--gold); }
.tool:hover, .tool.done { border-color: var(--line-2); color: var(--shell); }
.tool[hidden] { display: none; }
.rcv-set { margin-top: 12px; }
.rcv-set summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; font-weight: 500; }
.rcv-set summary::-webkit-details-marker { display: none; }
.rcv-set summary .ic { color: var(--gold); }

/* ---------- Biên lai ---------- */
.slip { text-align: center; padding-top: 4px; }
.slip .done-seal { margin-top: 8px; }
.slip.in .done-seal { background: linear-gradient(135deg, #b9e0cb, #86bfa3); }
.slip.fresh .done-seal { animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .slip.fresh .done-seal { animation: none; } }
.unit-l { font: 500 20px var(--serif); color: var(--gold); margin-left: 6px; }
.slip-paper { margin-top: 20px; text-align: left; padding: 16px; border-radius: var(--r-lg); background: rgba(40, 18, 15, .72); border: 1px solid var(--line); }
.slip-dl dd { word-break: break-word; }
.slip-btns { display: grid; gap: 10px; margin-top: 18px; }

/* ---------- Lịch sử: bấm vào dòng chuyển điểm ---------- */
.rows li.has-link { position: relative; }
.row-cover { position: absolute; inset: 0; }
.rows li.has-link:hover { background: rgba(239, 228, 206, .03); }

/* ---------- Trang cá nhân ---------- */
.pf-actions { display: grid; gap: 10px; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 6px 0 12px; }
.pf-actions .btn { min-height: 48px; font-size: 14px; padding: 12px 10px; }

/* ---------- Thanh tab: nút Quét nổi giữa ---------- */
.tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--shell-3);
  font: 400 11px/1.2 var(--sans); background: none; border: 0; cursor: pointer; padding: 0; }
.tabbar button:hover { color: var(--shell-2); }
.tabbar button.on { color: var(--gold-hi); }
.tabbar a.scan { position: relative; color: var(--shell-2); }
.tabbar .scan-orb { width: 54px; height: 54px; margin-top: -26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold-grad); color: var(--ink); box-shadow: 0 0 0 5px var(--lac-0), 0 10px 22px -8px rgba(217, 174, 82, .7); }
.tabbar a.scan .ic { color: var(--ink); }
.tabbar a.scan.on { color: var(--gold-hi); }

/* ---------- Menu trượt ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet[hidden] { display: none; }
.sheet-bg { position: absolute; inset: 0; background: rgba(8, 3, 2, .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: fadein .2s ease both; }
.sheet-card { position: absolute; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; max-height: 88vh; overflow-y: auto;
  overscroll-behavior: contain; background: var(--lac-2); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 24px 24px 0 0;
  padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); animation: sheetup .28s cubic-bezier(.2, .8, .2, 1) both;
  box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, .8); }
@keyframes sheetup { from { transform: translateY(40px); opacity: .4; } }
@keyframes fadein { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet-card, .sheet-bg { animation: none; } }
.sheet-grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 4px auto 12px; }
.sheet-me { display: flex; align-items: center; gap: 12px; padding: 4px 2px 12px; border-bottom: 1px solid var(--line); }
.mini-copy { appearance: none; border: 0; background: none; color: var(--gold); padding: 0 2px; cursor: pointer; vertical-align: -2px; font-size: 12px; }
.sheet-g { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--shell-3); margin: 16px 2px 6px; }
.sheet-list { list-style: none; margin: 0; padding: 0; border-radius: var(--r-md); background: rgba(18, 7, 6, .35); border: 1px solid var(--line); }
.sheet-list li + li { border-top: 1px solid var(--line); }
.sheet-list a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; color: var(--shell); }
.sheet-list a:hover { text-decoration: none; background: rgba(239, 228, 206, .03); }
.sheet-list .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--lac-3); color: var(--gold); flex: none; }
.sheet-list .t { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; }
.sheet-list .t small { display: block; font-size: 12px; font-weight: 400; color: var(--shell-3); }
.sheet-list > li > a > .ic:last-child { color: var(--shell-3); }
.sheet-help { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-out { margin-top: 16px; }
body.locked { overflow: hidden; }

/* ---------- Chân trang ví ---------- */
.vi-foot { margin-top: 42px; padding: 24px 0 8px; border-top: 1px solid var(--line); font-size: 13px; color: var(--shell-3); }
.vf-brand .brand b { font-size: 19px; }
.vf-brand p { margin: 10px 0 0; max-width: 40ch; color: var(--shell-2); }
.vf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.vi-foot h4 { margin: 0 0 8px; font: 600 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.vf-cols a { display: block; padding: 5px 0; color: var(--shell-2); }
.vf-cols a:hover { color: var(--shell); }
.vf-sites { margin-top: 20px; }
.vf-sites > div { display: flex; flex-wrap: wrap; gap: 8px; }
.vf-safe { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; padding: 12px; border-radius: var(--r-md);
  background: rgba(134, 191, 163, .07); border: 1px solid rgba(134, 191, 163, .22); color: var(--shell-2); }
.vf-safe .ic { color: var(--jade); margin-top: 1px; }
.vf-legal { margin: 16px 0 0; font-size: 11.5px; line-height: 1.6; }

/* Thông báo nổi nhỏ */
.vi-toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90;
  background: var(--shell); color: var(--ink); font-size: 14px; font-weight: 500; padding: 10px 16px; border-radius: 999px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .7); animation: fadein .2s ease both; max-width: 90vw; }
