:root{--pb-ui-font:'Kantumruy Pro',Inter,'Noto Sans Khmer',sans-serif;--pb-money-font:Manrope,Inter,sans-serif}
/* PublicBoost Wallet — Premium compact layout v20261018.1.
   UI only: account balance, order charges, ABA KHQR checkout and history APIs are unchanged. */

/* Left: funds + activity. Right: checkout + security. Never stretch the balance card. */
.wallet-dashboard {
  font-family:var(--pb-ui-font);
  display:grid;
  grid-template-columns:minmax(0,.93fr) minmax(0,1.07fr);
  gap:18px;
  align-items:start;
}
.wallet-overview-column,.wallet-checkout-column{
  display:flex;flex-direction:column;align-items:stretch;gap:17px;min-width:0;
}
.wallet-dashboard .wallet-overview-column>section,
.wallet-dashboard .wallet-checkout-column>section{
  margin:0;min-width:0;min-height:0;align-self:stretch;
}

/* Wallet overview: a concise, layered balance card instead of a tall empty panel. */
.wallet-dashboard .wallet-balance-card{
  position:relative;isolation:isolate;overflow:hidden;
  padding:25px 25px 22px;
  border-radius:23px;
  border:1px solid color-mix(in srgb,var(--accent) 34%,var(--line));
  background:
   radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--accent) 23%,transparent),transparent 55%),
   linear-gradient(145deg,color-mix(in srgb,var(--accent) 11%,var(--surface)) 0%,var(--surface) 72%);
  box-shadow:0 13px 32px rgba(33,21,70,.1),inset 0 1px color-mix(in srgb,#fff 7%,transparent);
}
.wallet-dashboard .wallet-balance-card::before{
  content:"";position:absolute;inset:0 0 auto;height:3px;
  background:linear-gradient(90deg,#618dfd,#945eff 50%,#d765ec);
  z-index:2;pointer-events:none;
}
.wallet-dashboard .wallet-balance-card::after{
  content:"";position:absolute;z-index:0;pointer-events:none;
  width:260px;height:260px;top:-170px;right:-80px;bottom:auto;
  border:1px solid color-mix(in srgb,var(--accent) 20%,transparent);
  border-radius:50%;background:radial-gradient(circle,color-mix(in srgb,var(--accent) 10%,transparent),transparent 67%);
}
.wallet-dashboard .wallet-balance-card>*{position:relative;z-index:1}
.wallet-balance-head{display:flex;align-items:center;justify-content:space-between;gap:14px}
.wallet-dashboard .wallet-balance-label{display:flex;gap:12px;min-width:0;align-items:center}
.wallet-balance-label-icon{
  width:43px;height:43px;flex:0 0 43px;display:grid;place-items:center;
  border:1px solid color-mix(in srgb,var(--accent) 24%,var(--line));
  border-radius:13px;color:var(--accent);
  background:color-mix(in srgb,var(--accent) 12%,var(--surface));
}
.wallet-balance-label-icon svg{width:21px!important;height:21px!important}
.wallet-balance-label-copy{display:flex;flex-direction:column;gap:3px;min-width:0}
.wallet-balance-label-copy small{
  font-size:9px;font-weight:900;letter-spacing:1.9px;line-height:1.3;
  color:var(--accent);text-transform:uppercase;
}
.wallet-balance-label-copy b{color:var(--text);font-weight:600;font-size:12px;line-height:1.5}
.wallet-currency-chip{
  display:inline-flex;gap:7px;align-items:center;justify-content:center;
  padding:7px 11px;white-space:nowrap;
  border:1px solid color-mix(in srgb,var(--accent) 22%,var(--line));
  background:color-mix(in srgb,var(--surface) 80%,var(--accent) 20%);
  border-radius:100px;color:var(--text);font-size:10px;font-weight:850;letter-spacing:.7px;
}
.wallet-currency-chip i{
  display:block;height:7px;width:7px;border-radius:50%;
  background:#69dbab;box-shadow:0 0 0 3px rgba(105,219,171,.13);
}
.wallet-balance-content{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding-top:26px;padding-bottom:15px;
}
.wallet-balance-info{flex:1;min-width:0}
.wallet-dashboard .wallet-balance-amount{
  margin:0;
  font-family:var(--pb-money-font);font-size:clamp(36px,3.4vw,46px);font-weight:700;
  letter-spacing:-1.35px;line-height:1.08;
  color:var(--text);overflow-wrap:anywhere;font-variant-numeric:tabular-nums;
}
.wallet-dashboard .wallet-balance-hint{
  color:var(--muted);font-size:11px;line-height:1.8;margin:7px 0 0;
}
.wallet-balance-ornament{
  display:grid;place-items:center;flex:0 0 104px;
  width:104px;height:104px;
  border:1px solid color-mix(in srgb,var(--accent) 21%,var(--line));
  border-radius:27px;transform:rotate(-11deg);
  background:linear-gradient(140deg,color-mix(in srgb,var(--accent) 27%,var(--surface)),color-mix(in srgb,var(--accent) 6%,var(--surface)));
  box-shadow:15px 17px 33px rgba(20,20,55,.13),inset 0 1px rgba(255,255,255,.12);
  position:relative;
}
.wallet-balance-ornament::before,
.wallet-balance-ornament::after{content:"";position:absolute;border:1px solid color-mix(in srgb,var(--accent) 32%,transparent);border-radius:50%}
.wallet-balance-ornament::before{width:137px;height:137px;opacity:.25}
.wallet-balance-ornament::after{width:79px;height:79px;opacity:.5}
.wallet-balance-ornament>span{
  z-index:1;display:grid;place-items:center;height:53px;width:62px;border-radius:16px;
  background:linear-gradient(135deg,#8568f7,#5a79eb);box-shadow:0 6px 23px rgba(116,85,244,.3);
  transform:rotate(11deg);color:#fff;
}
.wallet-balance-ornament svg{width:28px;height:28px}
.wallet-balance-action-row{margin-top:7px}
.wallet-balance-action-row .wallet-main-topup{
  display:inline-flex;align-items:center;justify-content:center;gap:12px;
  height:48px;min-height:48px;width:max-content;min-width:0;max-width:100%;
  padding:0 19px;border:0;border-radius:12px;
  color:white;font-weight:800;font-size:13px;line-height:1.5;
  background:linear-gradient(112deg,#8e65f1,#6d4cdd 57%,#5a7df1);
  box-shadow:0 10px 25px rgba(105,81,226,.25);
}
.wallet-balance-action-row .wallet-main-topup:hover{filter:brightness(1.08)}
.wallet-balance-action-row .wallet-main-topup svg{width:17px;height:17px;flex:none}
.wallet-balance-action-row .wallet-main-topup svg:last-child{
  margin-left:4px;border-left:1px solid rgba(255,255,255,.22);
  box-sizing:content-box;padding-left:11px;
}
.wallet-dashboard .wallet-benefits{
  margin-top:20px;padding:15px 0 0;
  border-top:1px solid color-mix(in srgb,var(--accent) 14%,var(--soft-line));
  display:flex;align-items:center;flex-wrap:wrap;gap:10px 18px;
}
.wallet-dashboard .wallet-benefits span{
  display:inline-flex;flex-direction:row;align-items:center;gap:7px;
  font-size:10px;line-height:1.5;color:var(--muted);
}
.wallet-dashboard .wallet-benefits b{font-size:10px;font-weight:600}
.wallet-dashboard .wallet-benefits svg{height:15px;width:15px;flex:none;color:var(--accent)}

/* Right: payment setup is visually distinct from the money balance. */
.wallet-dashboard .wallet-topup-card{
  border-radius:23px;padding:25px;
  background:linear-gradient(180deg,var(--surface),color-mix(in srgb,var(--surface) 96%,var(--accent) 4%));
  border-color:color-mix(in srgb,var(--accent) 10%,var(--line));
}
.wallet-topup-kicker{
  display:block;font-size:9px;letter-spacing:1.4px;font-weight:850;
  color:var(--accent);line-height:1.4;margin-bottom:8px;
}
.wallet-dashboard .wallet-card-heading{align-items:center;gap:16px;margin-bottom:20px}
.wallet-dashboard .wallet-card-heading h2{
  font-size:20px;font-weight:750;letter-spacing:-.4px;line-height:1.45;margin:0 0 3px;
}
.wallet-dashboard .wallet-card-heading p{font-size:11px;margin:0}
.wallet-dashboard .wallet-card-icon{
  width:45px;height:45px;flex:0 0 45px;border-radius:14px;
  border:1px solid color-mix(in srgb,var(--accent) 19%,var(--line));
}
.wallet-dashboard .wallet-card-icon svg{width:21px;height:21px}
.wallet-dashboard .wallet-amount-grid{gap:9px}
.wallet-dashboard .wallet-amount-button{
  min-height:63px;border-radius:12px;
  border-color:color-mix(in srgb,var(--accent) 10%,var(--line));
  background:color-mix(in srgb,var(--field) 96%,var(--accent) 4%);
  transition:border-color .15s,background .15s,box-shadow .15s;
}
.wallet-dashboard .wallet-amount-button b{font-family:var(--pb-money-font);font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:-.2px}
.wallet-dashboard .wallet-amount-button.active{
  border-color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--surface));
  box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 9%,transparent);
}
.wallet-dashboard .wallet-custom-amount{border-radius:12px;min-height:50px}
.wallet-dashboard .wallet-payment-method{border-radius:14px}
.wallet-dashboard .wallet-continue{min-height:48px;border-radius:12px;font-weight:800}
.wallet-dashboard .wallet-topup-summary{padding-top:16px;margin-top:15px}
.wallet-dashboard .wallet-topup-summary b{font-family:var(--pb-money-font);font-size:15px;font-weight:700;font-variant-numeric:tabular-nums}

/* Recent activity now follows the balance card, not at the far bottom after an empty row. */
.wallet-dashboard .wallet-transactions{
  border-radius:20px;padding:21px 22px 18px;
  background:var(--surface);
  box-shadow:0 9px 25px rgba(21,18,58,.045);
}
.wallet-dashboard .wallet-section-head h2{font-size:17px;font-weight:760;margin:0}
.wallet-dashboard .wallet-section-head{margin-bottom:5px}
.wallet-dashboard .wallet-activity-preview-caption{font-size:10px;margin:0 0 12px}
.wallet-dashboard .wallet-activity-list{border-radius:13px;background:color-mix(in srgb,var(--field) 60%,var(--surface))}
.wallet-dashboard .wallet-activity-row{
  grid-template-columns:36px minmax(0,1fr) auto;
  gap:12px;min-height:51px;padding:10px 12px;
}
.wallet-dashboard .wallet-activity-icon{width:34px;height:34px;border-radius:10px}
.wallet-dashboard .wallet-activity-copy b{font-size:11px}
.wallet-dashboard .wallet-activity-copy small{font-size:9px}
.wallet-dashboard .wallet-activity-row strong{font-family:var(--pb-money-font);font-size:11px;font-weight:700;font-variant-numeric:tabular-nums}
.wallet-dashboard .wallet-empty-state{
  min-height:106px;padding:17px 15px;border-radius:12px;
  background:color-mix(in srgb,var(--field) 47%,var(--surface));
}

/* Security reassurance card, concise and readable in both themes. */
.wallet-dashboard .wallet-security{
  border-radius:20px;padding:19px 21px;
  background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 5%,var(--surface)),var(--surface));
}
.wallet-dashboard .wallet-security-title{align-items:center;gap:11px}
.wallet-dashboard .wallet-security-title>svg{height:20px;width:20px}
.wallet-dashboard .wallet-security-title h2{font-size:15px;font-weight:750;line-height:1.5;margin:0}
.wallet-dashboard .wallet-security-title p{margin:2px 0 0;font-size:10px;line-height:1.7}
.wallet-dashboard .wallet-security-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:15px}
.wallet-dashboard .wallet-security-grid>div{
  min-width:0;display:flex;gap:7px;align-items:center;padding:10px;
  background:color-mix(in srgb,var(--field) 75%,var(--surface));border-radius:10px;
}
.wallet-dashboard .wallet-security-grid>div svg{width:16px;height:16px;flex:none}
.wallet-dashboard .wallet-security-grid b{font-size:10px;font-weight:650}
.wallet-dashboard .wallet-security-grid small{font-size:9px}

/* Theme parity: soft surface shadows, no washed-out white text on light backgrounds. */
:root[data-theme=light] .wallet-dashboard .wallet-balance-card{
  background:
    radial-gradient(ellipse at 100% 0%,rgba(150,122,246,.16),transparent 54%),
    linear-gradient(142deg,#fff 0%,#f5f2ff 61%,#f8f9ff 100%);
  box-shadow:0 13px 36px rgba(80,57,164,.085);
}
:root[data-theme=light] .wallet-balance-ornament{
  background:linear-gradient(140deg,#e0d9fb,#f4f4ff);
  box-shadow:12px 14px 24px rgba(105,83,189,.12),inset 0 1px #fff;
}
:root[data-theme=light] .wallet-currency-chip{background:#eee9fc;color:#4c3d79}
:root[data-theme=light] .wallet-dashboard .wallet-balance-hint{color:#666079}
:root[data-theme=light] .wallet-dashboard .wallet-benefits span{color:#666079}
:root[data-theme=light] .wallet-dashboard .wallet-topup-card{background:linear-gradient(160deg,#fff,#faf9ff)}
:root[data-theme=light] .wallet-dashboard .wallet-security{background:#faf9ff}

/* Tablet: stack cards and keep the prominent top-up form immediately after the balance. */
@media(max-width:1100px){
 .wallet-dashboard{display:flex;flex-direction:column;align-items:stretch;gap:14px}
 .wallet-overview-column,.wallet-checkout-column{display:contents}
 .wallet-dashboard .wallet-balance-card{order:1}
 .wallet-dashboard .wallet-topup-card{order:2}
 .wallet-dashboard .wallet-transactions{order:3}
 .wallet-dashboard .wallet-security{order:4}
 .wallet-dashboard .wallet-balance-content{padding-top:19px}
}
@media(max-width:600px){
 .wallet-dashboard{gap:12px}
 .wallet-dashboard .wallet-balance-card{padding:20px 19px 18px;border-radius:19px}
 .wallet-balance-label-icon{width:39px;height:39px;flex-basis:39px;border-radius:11px}
 .wallet-balance-label-copy b{font-size:11px}
 .wallet-currency-chip{font-size:9px;padding:6px 9px}
 .wallet-dashboard .wallet-balance-amount{font-size:clamp(34px,9vw,40px);letter-spacing:-1.15px}
 .wallet-dashboard .wallet-balance-hint{font-size:10px}
 .wallet-balance-ornament{width:72px;height:72px;flex:0 0 72px;border-radius:19px}
 .wallet-balance-ornament>span{width:47px;height:42px;border-radius:11px}
 .wallet-balance-ornament svg{width:22px;height:22px}
 .wallet-balance-ornament::before{width:95px;height:95px}
 .wallet-balance-ornament::after{width:57px;height:57px}
 .wallet-balance-action-row .wallet-main-topup{width:100%;max-width:100%;min-height:46px;height:46px;padding:0 12px}
 .wallet-dashboard .wallet-benefits{justify-content:space-between;gap:8px;margin-top:17px;padding-top:13px}
 .wallet-dashboard .wallet-benefits span{flex-direction:row;gap:4px;font-size:9px;text-align:left}
 .wallet-dashboard .wallet-benefits b{font-size:9px}
 .wallet-dashboard .wallet-benefits svg{width:13px;height:13px}
 .wallet-dashboard .wallet-topup-card{padding:20px 17px;border-radius:19px}
 .wallet-dashboard .wallet-card-heading h2{font-size:18px}
 .wallet-dashboard .wallet-transactions,.wallet-dashboard .wallet-security{padding:18px 16px;border-radius:18px}
 .wallet-dashboard .wallet-security-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
 .wallet-dashboard .wallet-security-grid>div{flex-direction:column;align-items:flex-start;padding:8px 7px}
 .wallet-dashboard .wallet-security-grid b{font-size:9px}
 .wallet-dashboard .wallet-security-grid small{font-size:8px}
}
@media(max-width:360px){
 .wallet-dashboard .wallet-benefits{gap:6px;justify-content:flex-start}
 .wallet-dashboard .wallet-benefits span:last-child{display:none}
 .wallet-balance-ornament{width:56px;height:56px;flex:0 0 56px;opacity:.7}
 .wallet-balance-ornament>span{width:38px;height:34px}
 .wallet-dashboard .wallet-amount-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(prefers-reduced-motion:reduce){
 .wallet-dashboard .wallet-amount-button{transition:none}
 .wallet-balance-ornament,.wallet-balance-ornament>span{animation:none}
}

/* PublicBoost v20261018.2 — subtle USD indicator "Active" breathing glow.
   A decorative currency accent, not proof of an online user or a live payment. */
.wallet-dashboard .wallet-currency-chip i {
  position:relative;
  width:8px;
  height:8px;
  flex:0 0 8px;
  border-radius:50%;
  background:#62e3a5;
  box-shadow:0 0 0 3px rgba(98,227,165,.13),0 0 11px rgba(98,227,165,.43);
  animation:pbWalletUsdGlow 2.8s ease-in-out infinite;
}
.wallet-dashboard .wallet-currency-chip i::after {
  content:"";
  position:absolute;
  inset:-5px;
  border:1px solid rgba(98,227,165,.42);
  border-radius:50%;
  opacity:.75;
  pointer-events:none;
  animation:pbWalletUsdHalo 2.8s ease-in-out infinite;
}
@keyframes pbWalletUsdGlow {
  0%,100% {
    background:#62e3a5;
    box-shadow:0 0 0 3px rgba(98,227,165,.13),0 0 8px rgba(98,227,165,.32);
  }
  50% {
    background:#8af7c5;
    box-shadow:0 0 0 5px rgba(98,227,165,.22),0 0 16px rgba(98,227,165,.66);
  }
}
@keyframes pbWalletUsdHalo {
  0%,100%{opacity:.58;transform:scale(.88)}
  50%{opacity:1;transform:scale(1.13)}
}
:root[data-theme=light] .wallet-dashboard .wallet-currency-chip i {
  background:#22ba82;
  box-shadow:0 0 0 3px rgba(34,186,130,.12),0 0 10px rgba(34,186,130,.26);
}
:root[data-theme=light] .wallet-dashboard .wallet-currency-chip i::after {
  border-color:rgba(34,186,130,.38);
}
:root[data-motion=off] .wallet-dashboard .wallet-currency-chip i,
:root[data-motion=off] .wallet-dashboard .wallet-currency-chip i::after {
  animation:none!important;
}
@media(prefers-reduced-motion:reduce){
  .wallet-dashboard .wallet-currency-chip i,
  .wallet-dashboard .wallet-currency-chip i::after {
    animation:none!important;
  }
}
