.wallet-peek{
    position:relative;z-index:1;width:100%;min-height:78px;margin:0 0 16px;padding:12px 13px;
    display:grid;grid-template-columns:46px minmax(0,1fr) 34px;align-items:center;gap:11px;
    text-align:right;border:1px solid rgba(247,200,120,.3);border-radius:18px;
    background:rgba(27,57,64,.88);box-shadow:0 18px 34px -28px rgba(0,0,0,.9);
}
.wallet-peek::after{content:"";position:absolute;inset:9px auto 9px 0;width:3px;border-radius:0 3px 3px 0;background:var(--amber-soft);}
.wallet-peek:active{transform:scale(.985);}
.wallet-peek__icon{width:46px;height:46px;display:grid;place-items:center;border-radius:15px;background:var(--amber-soft);color:var(--ink);}
.wallet-peek__icon svg{width:23px;height:23px;stroke:currentColor;}
.wallet-peek__copy{display:flex;min-width:0;flex-direction:column;gap:2px;}
.wallet-peek__copy small{font-size:10.5px;font-weight:800;color:var(--teal-soft);}
.wallet-peek__copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:950;color:var(--paper);}
.wallet-peek__copy em{font-style:normal;font-size:9.5px;font-weight:850;color:#ffb5ad;}
.wallet-peek__copy em[hidden]{display:none;}
.wallet-peek__action{width:32px;height:32px;display:grid;place-items:center;border-radius:10px;background:rgba(246,239,221,.07);color:var(--paper-dim);}
.wallet-peek__action svg{width:17px;height:17px;stroke:currentColor;}
.wallet-peek.is-loading .wallet-peek__copy strong{width:118px;height:16px;border-radius:6px;background:rgba(246,239,221,.1);color:transparent;animation:wallet-pulse 1.2s ease-in-out infinite;}
.wallet-peek.is-low-balance{border-color:rgba(255,108,94,.72);background:linear-gradient(135deg,rgba(106,35,35,.94),rgba(52,35,38,.95));box-shadow:0 18px 38px -24px rgba(225,67,55,.85);}
.wallet-peek.is-low-balance::after{background:#ff6c5e;box-shadow:0 0 14px rgba(255,108,94,.65);}
.wallet-peek.is-low-balance .wallet-peek__icon{background:#ff786b;color:#301211;}

.bottom-nav .nav-pill{width:calc(25% - 8px);}
.bottom-nav .nav-item{width:25%;}
html.wallet-hidden .wallet-peek,
html.wallet-hidden #walletNavBtn,
html.wallet-hidden .wallet-overlay,
html.wallet-hidden .wallet-confirm-overlay,
html.wallet-hidden .wallet-topup-overlay{display:none!important;}
html.wallet-hidden.taxi-payment-active .wallet-confirm-overlay{display:flex!important;}
html.wallet-hidden .bottom-nav .nav-pill{width:calc(33.333% - 8px);}
html.wallet-hidden .bottom-nav .nav-item{width:33.333%;}

.wallet-overlay,.wallet-confirm-overlay,.wallet-topup-overlay{
    position:absolute;inset:0;z-index:95;display:flex;align-items:flex-end;
    background:rgba(5,14,16,.76);opacity:0;visibility:hidden;pointer-events:none;
    transition:opacity .2s ease,visibility .2s ease;
}
.wallet-overlay.show,.wallet-confirm-overlay.show,.wallet-topup-overlay.show{opacity:1;visibility:visible;pointer-events:auto;}
.wallet-sheet{
    width:100%;height:calc(100% - var(--safe-t));min-height:0;overflow-y:auto;
    padding:calc(18px + var(--safe-t)) 16px calc(var(--safe-b) + 28px);
    border-radius:26px 26px 0 0;background:#12272c;border-top:1px solid rgba(246,239,221,.16);
    box-shadow:0 -26px 60px -34px rgba(0,0,0,.9);
    transform:translateY(28px);transition:transform .26s cubic-bezier(.2,.9,.25,1);
    scrollbar-width:none;
}
.wallet-sheet::-webkit-scrollbar{display:none;}
.wallet-overlay.show .wallet-sheet{transform:translateY(0);}
.wallet-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px;}
.wallet-head span,.wallet-ledger-head span{display:block;font-size:10px;font-weight:850;color:var(--teal-soft);}
.wallet-head h2{font-size:20px;font-weight:950;line-height:1.5;}
.wallet-icon-button{
    width:42px;height:42px;display:grid;place-items:center;flex:0 0 42px;border-radius:13px;
    color:var(--paper-dim);background:rgba(246,239,221,.07);border:1px solid var(--line);
}
.wallet-icon-button svg{width:19px;height:19px;stroke:currentColor;}

.wallet-state{min-height:430px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px;}
.wallet-state[hidden],.wallet-content[hidden]{display:none;}
.wallet-state__mark{width:72px;height:72px;display:grid;place-items:center;margin-bottom:18px;border-radius:22px;background:var(--amber-soft);color:var(--ink);box-shadow:0 18px 34px -22px rgba(242,169,59,.8);}
.wallet-state__mark svg{width:34px;height:34px;stroke:currentColor;}
.wallet-state__mark--error{font-size:28px;font-weight:950;background:rgba(225,97,63,.18);color:var(--coral-soft);border:1px solid rgba(225,97,63,.35);}
.wallet-state h3{font-size:18px;font-weight:950;}
.wallet-state p{max-width:300px;margin:5px 0 18px;font-size:12px;color:var(--muted);}
.wallet-state--loading{display:block;padding:8px 0;min-height:0;}
.wallet-skeleton{height:74px;margin-bottom:12px;border-radius:16px;background:rgba(246,239,221,.07);animation:wallet-pulse 1.2s ease-in-out infinite;}
.wallet-skeleton--balance{height:210px;background:rgba(247,200,120,.08);}
@keyframes wallet-pulse{50%{opacity:.45;}}

.wallet-primary,.wallet-secondary{
    min-height:46px;padding:0 18px;display:inline-flex;align-items:center;justify-content:center;gap:8px;
    border-radius:14px;font-size:12.5px;font-weight:950;
}
.wallet-primary{background:var(--amber-soft);color:var(--ink);box-shadow:0 16px 30px -22px rgba(242,169,59,.9);}
.wallet-secondary{background:rgba(246,239,221,.08);color:var(--paper);border:1px solid var(--line-strong);}
.wallet-primary svg,.wallet-secondary svg{width:17px;height:17px;stroke:currentColor;}
.wallet-primary:disabled{cursor:not-allowed;opacity:.45;box-shadow:none;}

.wallet-balance{position:relative;overflow:hidden;padding:20px;border-radius:20px;background:#1a3940;border:1px solid rgba(247,200,120,.32);box-shadow:0 24px 46px -34px rgba(0,0,0,.95);}
.wallet-balance::before{content:"";position:absolute;inset:0 0 auto;height:3px;background:linear-gradient(90deg,var(--teal-soft),var(--amber-soft),var(--coral-soft));}
.wallet-balance__topline{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:11px;font-weight:800;color:var(--muted);}
.wallet-balance__status{display:inline-flex;align-items:center;gap:5px;color:var(--teal-soft);}
.wallet-balance__status i{width:6px;height:6px;border-radius:50%;background:var(--teal-soft);box-shadow:0 0 0 4px rgba(127,209,193,.09);}
.wallet-balance.is-low-balance{background:linear-gradient(145deg,#49272a,#2d292d);border-color:rgba(255,108,94,.6);box-shadow:0 24px 46px -28px rgba(225,67,55,.75);}
.wallet-balance.is-low-balance::before{background:linear-gradient(90deg,#ff6c5e,#ffad66);}
.wallet-balance__status.is-warning{color:#ffb5ad;}
.wallet-balance__status.is-warning i{background:#ff6c5e;box-shadow:0 0 0 4px rgba(255,108,94,.13);}
.wallet-low-balance{margin:0 0 14px;padding:10px 11px;border:1px solid rgba(255,108,94,.28);border-radius:12px;background:rgba(255,108,94,.09);color:#ffd0cb;font-size:10.5px;font-weight:800;line-height:1.8;}
.wallet-low-balance[hidden]{display:none;}
.wallet-balance__amount{display:flex;align-items:baseline;gap:8px;margin:18px 0 14px;direction:rtl;}
.wallet-balance__amount strong{min-width:0;overflow-wrap:anywhere;font-size:32px;font-weight:950;line-height:1.25;color:var(--paper);font-variant-numeric:tabular-nums;}
.wallet-balance__amount span{font-size:12px;font-weight:850;color:var(--amber-soft);}
.wallet-balance__held{display:flex;align-items:center;gap:7px;margin-bottom:14px;padding:9px 10px;border-radius:12px;background:rgba(242,169,59,.08);color:var(--paper-dim);font-size:10.5px;font-weight:750;}
.wallet-balance__held svg{width:15px;height:15px;flex:0 0 15px;stroke:var(--amber-soft);}
.wallet-actions{display:grid;grid-template-columns:minmax(0,1fr) 46px;gap:8px;}
.wallet-actions .wallet-primary{width:100%;}
.wallet-refresh{width:46px;height:46px;}
.wallet-refresh.is-spinning svg{animation:wallet-spin .65s linear infinite;}
@keyframes wallet-spin{to{transform:rotate(360deg);}}

.wallet-ledger-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:24px 2px 10px;}
.wallet-ledger-head h3{font-size:16px;font-weight:950;}
.wallet-ledger-head > span{padding-bottom:2px;color:var(--muted-dim);}
.wallet-transactions{display:flex;flex-direction:column;border-top:1px solid var(--line);}
.wallet-transaction{min-height:74px;display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:11px;padding:12px 2px;border-bottom:1px solid var(--line);}
.wallet-transaction__icon{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:rgba(127,209,193,.1);color:var(--teal-soft);}
.wallet-transaction--out .wallet-transaction__icon{background:rgba(225,97,63,.1);color:var(--coral-soft);}
.wallet-transaction--hold .wallet-transaction__icon{background:rgba(242,169,59,.1);color:var(--amber-soft);}
.wallet-transaction__icon svg{width:19px;height:19px;stroke:currentColor;}
.wallet-transaction__copy{min-width:0;display:flex;flex-direction:column;gap:2px;}
.wallet-transaction__copy b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;font-weight:900;color:var(--paper);}
.wallet-transaction__copy time{font-size:9.5px;font-weight:750;color:var(--muted-dim);}
.wallet-transaction__amount{text-align:left;white-space:nowrap;direction:rtl;}
.wallet-transaction__amount b{display:block;font-size:12px;font-weight:950;color:var(--teal-soft);font-variant-numeric:tabular-nums;}
.wallet-transaction--out .wallet-transaction__amount b,.wallet-transaction--hold .wallet-transaction__amount b{color:var(--coral-soft);}
.wallet-transaction__amount small{font-size:9px;color:var(--muted-dim);}
.wallet-empty{min-height:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--muted);}
.wallet-empty[hidden]{display:none;}
.wallet-empty > span{width:52px;height:52px;display:grid;place-items:center;margin-bottom:12px;border-radius:16px;background:rgba(127,209,193,.09);color:var(--teal-soft);}
.wallet-empty svg{width:25px;height:25px;stroke:currentColor;}
.wallet-empty b{font-size:13px;color:var(--paper-dim);}
.wallet-empty p{font-size:10.5px;}
.wallet-more{width:100%;min-height:42px;margin-top:12px;border:1px solid var(--line);border-radius:12px;background:rgba(246,239,221,.04);font-size:11px;font-weight:850;color:var(--teal-soft);}
.wallet-payout{margin-top:16px;padding:16px;border:1px solid var(--line);border-radius:18px;background:rgba(246,239,221,.035);}
.wallet-payout__head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:13px}.wallet-payout__head span{font-size:9.5px;color:var(--teal-soft)}.wallet-payout__head h3{font-size:15px}.wallet-payout__iban{direction:ltr;padding:5px 8px;border-radius:9px;background:rgba(127,209,193,.08);font-variant-numeric:tabular-nums}
.wallet-payout form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-top:10px}.wallet-payout form>label{grid-column:1/-1;font-size:10.5px;font-weight:850;color:var(--muted)}
.wallet-payout__iban-field,.wallet-payout__amount-field{display:flex;align-items:center;gap:7px;min-height:44px;padding:0 10px;border:1px solid var(--line-strong);border-radius:12px;background:rgba(12,36,42,.7)}.wallet-payout__iban-field:focus-within,.wallet-payout__amount-field:focus-within{border-color:var(--teal-soft)}.wallet-payout__iban-field{direction:ltr;padding:4px 5px 4px 10px}.wallet-payout__iban-field input,.wallet-payout__amount-field input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:var(--paper);font:inherit;direction:ltr;text-align:left;font-variant-numeric:tabular-nums}.wallet-payout__amount-field input{direction:rtl;text-align:right}.wallet-payout__amount-field b{font-size:10px;color:var(--amber-soft)}.wallet-payout__iban-code{width:40px;height:34px;display:grid;place-items:center;flex:0 0 40px;border:1px solid rgba(127,209,193,.22);border-radius:9px;background:rgba(127,209,193,.12);color:var(--teal-soft);font:950 11px/1 Arial,sans-serif;letter-spacing:.08em;box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
.wallet-payout form button{min-height:44px;padding:0 12px}.wallet-payout__hint,.wallet-payout__state{margin:10px 0 0;font-size:9.5px;line-height:1.8;color:var(--muted)}.wallet-payout__state.is-error{color:var(--coral-soft)}.wallet-payout__state.is-success{color:var(--teal-soft)}
.wallet-transaction__status{display:inline-flex;width:max-content;margin-top:3px;padding:2px 7px;border-radius:999px;font-size:8.5px;font-weight:900}.wallet-transaction__status--pending{color:#ffd18a;background:rgba(242,169,59,.13)}.wallet-transaction__status--paid{color:#9ce3cf;background:rgba(127,209,193,.13)}

.wallet-confirm-overlay{z-index:140;align-items:center;justify-content:center;padding:18px;}
.wallet-confirm{width:min(390px,100%);padding:24px;border-radius:22px;background:#162f35;border:1px solid rgba(246,239,221,.17);box-shadow:0 30px 80px -28px rgba(0,0,0,.95);text-align:center;transform:translateY(18px) scale(.98);transition:transform .22s ease;}
.wallet-confirm-overlay.show .wallet-confirm{transform:none;}
.wallet-confirm__mark{width:54px;height:54px;display:grid;place-items:center;margin:0 auto 10px;border-radius:17px;background:var(--amber-soft);color:var(--ink);}
.wallet-confirm__mark svg{width:27px;height:27px;stroke:currentColor;}
.wallet-confirm__kicker{font-size:10px;font-weight:900;color:var(--teal-soft);}
.wallet-confirm h2{font-size:19px;font-weight:950;}
.wallet-confirm > p{margin:4px auto 14px;font-size:11px;color:var(--muted);}
.wallet-confirm__summary{overflow:hidden;margin:14px 0;border:1px solid var(--line);border-radius:15px;text-align:right;}
.wallet-confirm__summary > div{min-height:47px;padding:9px 12px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);}
.wallet-confirm__summary > div:last-child{border-bottom:0;}
.wallet-confirm__summary dt{font-size:10.5px;font-weight:750;color:var(--muted);}
.wallet-confirm__summary dd{font-size:10.5px;color:var(--paper-dim);}
.wallet-confirm__summary dd b{font-size:12.5px;color:var(--paper);font-variant-numeric:tabular-nums;}
.wallet-confirm__remaining{background:rgba(127,209,193,.06);}
.wallet-confirm__error{padding:9px!important;border-radius:11px;background:rgba(225,97,63,.1);color:var(--coral-soft)!important;font-weight:800;}
.wallet-confirm__actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;}

.wallet-topup-overlay{z-index:150;}
.wallet-topup{
    width:100%;padding:20px 18px calc(var(--safe-b) + 22px);border-radius:24px 24px 0 0;
    background:#162f35;border-top:1px solid rgba(246,239,221,.17);
    box-shadow:0 -26px 70px -28px rgba(0,0,0,.95);transform:translateY(28px);
    transition:transform .24s cubic-bezier(.2,.9,.25,1);
}
.wallet-topup-overlay.show .wallet-topup{transform:none;}
.wallet-topup__head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px;}
.wallet-topup__head span{display:block;font-size:10px;font-weight:850;color:var(--teal-soft);}
.wallet-topup__head h2{font-size:19px;font-weight:950;line-height:1.5;}
.wallet-topup__field{display:flex;flex-direction:column;gap:7px;font-size:11px;font-weight:850;color:var(--paper-dim);}
.wallet-topup__input{
    min-height:58px;padding:0 14px;display:flex;align-items:center;gap:10px;border-radius:16px;
    background:rgba(246,239,221,.055);border:1px solid var(--line-strong);
    transition:border-color .18s ease,background .18s ease;
}
.wallet-topup__input:focus-within{border-color:var(--amber-soft);background:rgba(247,200,120,.07);}
.wallet-topup__input input{
    min-width:0;width:100%;border:0;outline:0;background:transparent;color:var(--paper);
    font:900 20px/1.4 'Vazirmatn',Tahoma,sans-serif;direction:ltr;text-align:right;letter-spacing:0;
}
.wallet-topup__input input::placeholder{font-size:13px;font-weight:600;color:var(--muted-dim);}
.wallet-topup__input b{flex:0 0 auto;font-size:11px;color:var(--amber-soft);}
.wallet-topup__presets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:10px;}
.wallet-topup__presets button{min-height:38px;padding:5px;border-radius:11px;background:rgba(246,239,221,.065);border:1px solid var(--line);font-size:9.5px;font-weight:850;color:var(--paper-dim);}
.wallet-topup__presets button.is-selected{background:var(--amber-soft);border-color:var(--amber-soft);color:var(--ink);}
.wallet-topup__presets button:disabled{opacity:.35;cursor:not-allowed;}
.wallet-topup__hint{min-height:21px;margin:7px 2px 0;font-size:9.5px;color:var(--muted);}
.wallet-topup__error{margin:8px 0 0;padding:9px 11px;border-radius:11px;background:rgba(225,97,63,.11);border:1px solid rgba(225,97,63,.25);font-size:10.5px;font-weight:800;color:var(--coral-soft);}
.wallet-topup__error[hidden]{display:none;}
.wallet-topup__gateway{display:grid;grid-template-columns:38px minmax(0,1fr) 8px;align-items:center;gap:10px;margin:14px 0;padding:11px 12px;border-block:1px solid var(--line);}
.wallet-topup__gateway-mark{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:rgba(127,209,193,.1);color:var(--teal-soft);}
.wallet-topup__gateway-mark svg{width:19px;height:19px;stroke:currentColor;}
.wallet-topup__gateway > span:nth-child(2){display:flex;min-width:0;flex-direction:column;}
.wallet-topup__gateway b{font-size:11.5px;color:var(--paper-dim);}
.wallet-topup__gateway small{font-size:9px;color:var(--muted);}
.wallet-topup__gateway i{width:7px;height:7px;border-radius:50%;background:var(--teal-soft);box-shadow:0 0 0 4px rgba(127,209,193,.09);}
.wallet-topup__submit{width:100%;}
.wallet-topup__submit.is-loading{pointer-events:none;opacity:.7;}

@media (min-width:760px){
    .wallet-peek{width:100%;max-width:none;min-height:92px;padding:17px 18px;margin-bottom:22px;grid-template-columns:52px minmax(0,1fr) 40px;gap:14px;}
    .wallet-peek__icon{width:52px;height:52px;border-radius:17px;}
    .wallet-peek__action{width:38px;height:38px;border-radius:12px;}
    .wallet-peek__copy strong{font-size:16px;}
    .wallet-overlay{align-items:center;justify-content:center;padding:24px;}
    .wallet-topup-overlay{align-items:center;justify-content:center;padding:24px;}
    .wallet-topup{width:min(460px,100%);padding:24px;border:1px solid var(--line-strong);border-radius:22px;transform:translateY(18px) scale(.99);}
    .wallet-sheet{width:min(720px,100%);height:min(780px,calc(100dvh - 80px));padding:26px 30px 32px;border:1px solid var(--line-strong);border-radius:24px;transform:translateY(24px);}
    .wallet-balance{padding:24px;}
    .wallet-balance__amount strong{font-size:38px;}
    .wallet-state{min-height:520px;}
}

@media (max-width:350px){
    .wallet-peek{grid-template-columns:42px minmax(0,1fr) 30px;padding:10px;}
    .wallet-peek__icon{width:42px;height:42px;}
    .wallet-balance{padding:17px 14px;}
    .wallet-balance__amount strong{font-size:27px;}
    .wallet-confirm{padding:20px 16px;}
    .wallet-topup__presets{grid-template-columns:repeat(2,minmax(0,1fr));}
}

@media (prefers-reduced-motion:reduce){
    .wallet-skeleton,.wallet-refresh.is-spinning svg{animation:none;}
}
