/* ===== Профиль: аккаунт, редактирование, пополнение, настройки, история операций, диалог ===== */
.pf-nav{flex:none}
.pf-nav .pf-sp{width:24px;height:24px;flex:none}
.pf-nav .icon-btn img{width:20px;height:20px}
.pf-nav .icon-btn[data-back] img{width:24px;height:24px}
.pf-body{display:flex;flex-direction:column;align-items:stretch;padding:20px 16px calc(24px + var(--safe-b))}
.pf-body.g32{gap:32px}
.pf-body.g24{gap:24px}
.pf-body.g20{gap:20px}

/* --- личные данные --- */
.pf-id{display:flex;flex-direction:column;align-items:center;gap:16px}
.pf-ava{position:relative;width:112px;height:112px;border-radius:50%;border:4px solid #f0eef3;animation:pop .55s var(--ease-spring) both}
.pf-ava img{width:100%;height:100%;border-radius:50%;object-fit:cover}
.pf-ava-edit{position:absolute;right:-4px;bottom:-4px;width:32px;height:32px;border-radius:20px;background:#fff;display:grid;place-items:center;filter:drop-shadow(0 3px 6px rgba(51,26,102,.14));transition:transform .18s var(--ease)}
.pf-ava-edit:active{transform:scale(.88)}
.pf-ava-edit img{width:16px;height:16px}
.pf-name{display:flex;flex-direction:column;gap:4px;text-align:center;animation:rise .55s var(--ease) .08s both}

/* --- карточка баланса --- */
.pf-bal{position:relative;display:flex;align-items:center;justify-content:space-between;padding:20px 16px;border-radius:16px;overflow:hidden;color:#fff;cursor:pointer;
  background:linear-gradient(40.085deg,#8b3dff 0%,#7228e0 28%,#8b3dff 56%,#a56bff 81%,#d9c2ff 100%);box-shadow:0 10px 32px -3px rgba(114,40,224,.4);
  transition:transform .25s var(--ease),box-shadow .25s;animation:rise .6s var(--ease) .14s both}
.pf-bal:active{transform:scale(.985);box-shadow:0 6px 20px -3px rgba(114,40,224,.4)}
.pf-bal::after{content:"";position:absolute;top:-60%;bottom:-60%;left:-40%;width:34%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.22),transparent);transform:rotate(18deg) translateX(0);animation:pf-shine 5.5s var(--ease) 1.2s infinite;pointer-events:none}
@keyframes pf-shine{0%{transform:rotate(18deg) translateX(0)}32%,100%{transform:rotate(18deg) translateX(620%)}}
.pf-bal-d{display:flex;flex-direction:column;gap:4px;min-width:0}
.pf-bal-l{display:flex;align-items:center;gap:4px;height:22px;font-size:14px;line-height:18px;font-weight:600}
.pf-bal-l svg{width:14px;height:14px;opacity:.8;transition:transform .25s var(--ease)}
.pf-bal:active .pf-bal-l svg{transform:translateX(3px)}
.pf-bal-v{font-size:20px;line-height:24px;font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}
.pf-bal-btn{position:relative;z-index:1;flex:none;height:44px;padding:0 16px;border-radius:12px;background:#fff;color:var(--text-brand);font-size:16px;line-height:1;font-weight:600;white-space:nowrap;transition:transform .18s var(--ease),background .2s}
.pf-bal-btn:active{transform:scale(.95);background:#f4eeff}

/* --- карточки со строками (меню, настройки) --- */
.pf-card{background:#fff;border:1px solid #f0eef3;border-radius:14px;padding:8px 14px;overflow:hidden;display:flex;flex-direction:column}
.pf-row{position:relative;display:flex;align-items:center;gap:12px;padding:16px 0;width:100%;text-align:left;font-size:14px;line-height:16px;font-weight:500;color:var(--text-1)}
.pf-row+.pf-row{box-shadow:inset 0 1px 0 #f0eef3}
.pf-row::before{content:"";position:absolute;inset:1px -14px 0;background:#f7f6f9;opacity:0;transition:opacity .2s}
button.pf-row:active::before{opacity:1}
.pf-row>*{position:relative}
.pf-row>img{flex:none;width:20px;height:20px;transition:transform .25s var(--ease)}
button.pf-row:active>img{transform:scale(.9)}
.pf-row>img.pf-rot{transform:rotate(-90deg)}
button.pf-row:active>img.pf-rot{transform:rotate(-90deg) scale(.9)}
.pf-row>span{flex:1;min-width:0}
.pf-stag>*{opacity:0}
.pf-stag.in>*{animation:rise .5s var(--ease) both;animation-delay:calc(.2s + var(--i,0)*50ms)}

/* --- третичные кнопки --- */
.pf-tert{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;padding:4px 0;font-size:16px;line-height:1;font-weight:600;color:var(--text-2);transition:transform .18s var(--ease),opacity .2s}
.pf-tert:active{transform:scale(.97);opacity:.7}
.pf-tert img{width:20px;height:20px}
.pf-tert.pf-red{color:#c93842}

/* --- переключатель --- */
.pf-sw{flex:none;width:48px;height:28px;padding:4px;border-radius:24px;background:#dcdde1;transition:background .3s var(--ease)}
.pf-sw i{display:block;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(25,26,32,.16);transition:transform .35s var(--ease-spring),width .2s var(--ease)}
.pf-sw.on{background:var(--brand-1)}
.pf-sw.on i{transform:translateX(20px)}
.pf-sw:active i{width:24px}
.pf-sw.on:active i{transform:translateX(16px)}

/* --- диалог --- */
.pf-dlg-bd{position:absolute;inset:0;background:rgba(23,23,27,.4);opacity:0;transition:opacity .3s;z-index:20}
.pf-dlg-bd.show{opacity:1}
.pf-dlg{position:absolute;left:16px;right:16px;top:50%;z-index:21;background:#fff;border-radius:24px;padding:24px;display:flex;flex-direction:column;gap:24px;align-items:stretch;overflow:hidden;
  opacity:0;transform:translateY(-46%) scale(.88);transition:opacity .2s,transform .5s var(--ease-spring);box-shadow:0 24px 60px -20px rgba(25,26,32,.35)}
.pf-dlg.show{opacity:1;transform:translateY(-50%)}
.pf-dlg.hide{opacity:0;transform:translateY(-50%) scale(.94);transition:opacity .2s,transform .25s var(--ease)}
.pf-dlg-msg{display:flex;flex-direction:column;gap:12px;text-align:center}
.pf-dlg-msg b{font-weight:700}
.pf-dlg-acts{display:flex;flex-direction:column;gap:12px}
.btn.pf-danger{background:#c93842}
.btn.pf-danger:active{background:#ad2c36}

/* --- редактирование профиля --- */
.pf-edit .pf-id{gap:0}
.pf-fcard{background:#fff;border-radius:14px;padding:0 16px;display:flex;flex-direction:column}
.pf-f{display:flex;align-items:center;gap:12px;height:68px;width:100%;text-align:left;cursor:text}
.pf-f+.pf-f{box-shadow:inset 0 1px 0 #f0eef3}
button.pf-f{cursor:pointer}
.pf-f>img{flex:none;width:20px;height:20px}
.pf-f>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}
.pf-f small{font-size:12px;line-height:15px;font-weight:500;color:var(--text-2);transition:color .2s}
.pf-f:focus-within small{color:var(--text-brand)}
.pf-f input,.pf-f .pf-val{display:block;width:100%;height:16px;padding:0;border:0;outline:0;background:none;font-size:14px;line-height:16px;font-weight:500;color:var(--text-1);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pf-f .pf-val.pf-link{color:var(--text-brand)}
button.pf-f{transition:opacity .2s}
button.pf-f:active{opacity:.6}
.pf-f.err small{color:#c93842}
.pf-f.err{animation:shake .4s}
.pf-wheels{position:relative;display:flex;gap:8px;height:180px;margin:4px 0}
.pf-wheels::before{content:"";position:absolute;left:0;right:0;top:72px;height:36px;border-radius:10px;background:var(--brand-soft);pointer-events:none}
.pf-wheels::after{content:"";position:absolute;inset:0;background:linear-gradient(to bottom,#fff,rgba(255,255,255,0) 34%,rgba(255,255,255,0) 66%,#fff);pointer-events:none}
.pf-wheel{position:relative;flex:1;height:180px;overflow-y:auto;scroll-snap-type:y mandatory;padding:72px 0;scrollbar-width:none;touch-action:pan-y;overscroll-behavior:contain}
.pf-wheel.m{flex:1.6}
.pf-wheel::-webkit-scrollbar{display:none}
.pf-wheel span{display:block;height:36px;line-height:36px;text-align:center;font-size:16px;font-weight:600;color:var(--text-3);scroll-snap-align:center;cursor:pointer;transition:color .2s,transform .2s var(--ease)}
.pf-wheel span.on{color:var(--text-brand);transform:scale(1.06)}

/* --- пополнение баланса --- */
.pf-topup .pf-body{padding-top:12px;padding-bottom:calc(112px + var(--safe-b))}
.pf-cur{display:flex;align-items:center;justify-content:space-between;gap:12px;height:60px;padding:0 16px;border-radius:16px;color:#fff;
  background:linear-gradient(29.296deg,#8b3dff 0%,#7228e0 28%,#8b3dff 56%,#a56bff 81%,#d9c2ff 100%);filter:drop-shadow(0 10px 16px rgba(114,40,224,.4));animation:rise .5s var(--ease) both}
.pf-cur span{font-size:14px;line-height:18px;font-weight:600}
.pf-cur b{font-size:20px;line-height:24px;font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}
.pf-blk{display:flex;flex-direction:column;gap:12px}
.pf-blk>.h-s{padding:0 14px}
.pf-blk>div{display:flex;flex-direction:column;gap:8px}
.pf-amt{display:flex;align-items:center;gap:20px;padding:15px;border-radius:14px;border:1px solid #f0eef3;background:#fff;cursor:text;transition:border-color .2s,box-shadow .2s}
.pf-amt:focus-within{border-color:var(--brand);box-shadow:0 0 0 3px rgba(132,59,245,.14)}
.pf-amt.err{border-color:var(--danger);box-shadow:0 0 0 3px rgba(229,72,77,.12);animation:shake .4s}
.pf-amt input{flex:1;min-width:0;height:20px;padding:0;border:0;outline:0;background:none;font-size:16px;line-height:20px;font-weight:700;color:var(--text-1)}
.pf-amt input::placeholder{color:var(--text-3);font-weight:500}
.pf-amt span{font-size:14px;line-height:16px;color:var(--text-2)}
.pf-presets{display:flex!important;flex-direction:row!important;gap:8px}
.pf-preset{flex:1;height:40px;border-radius:9px;background:#fff;font-size:14px;line-height:18px;font-weight:600;color:var(--text-1);text-align:center;white-space:nowrap;transition:background .2s,color .2s,transform .15s var(--ease)}
.pf-preset:active{transform:scale(.94)}
.pf-preset.on{background:#f1e9ff;color:var(--text-brand)}
.pf-brk-w{display:flex;flex-direction:column;gap:4px}
.pf-brk{background:#fff;border-radius:14px;padding:16px;display:flex;flex-direction:column}
.pf-brk .srow b{font-variant-numeric:tabular-nums}
.pf-brk .srow.tot b{font-weight:700}
.pf-note{padding:0 8px}
.pf-dock{position:absolute;left:0;right:0;bottom:0;z-index:8;padding:24px 16px calc(24px + var(--safe-b));background:linear-gradient(to bottom,rgba(255,255,255,0),#fff);backdrop-filter:blur(15px);-webkit-backdrop-filter:blur(15px);mask-image:linear-gradient(to bottom,transparent,#000 24px);-webkit-mask-image:linear-gradient(to bottom,transparent,#000 24px)}
.pf-dock .btn{width:100%}

/* --- история операций --- */
.pf-hist{background:#f7f7f8}
.pf-hist .topbar.stuck{background:rgba(247,247,248,.82)}
.pf-hist-body{display:flex;flex-direction:column;gap:16px;padding:8px 16px calc(24px + var(--safe-b))}
.pf-hist-h{display:flex;align-items:center;gap:12px}
.pf-hist-back{flex:none;width:44px;height:44px;border-radius:24px;background:#fff;display:grid;place-items:center;transition:transform .18s var(--ease)}
.pf-hist-back:active{transform:scale(.9)}
.pf-hist-back img{width:24px;height:24px}
.pf-panel{background:#fff;border-radius:24px;padding:16px;display:flex;flex-direction:column;gap:16px}
.pf-panel .pf-pl{font-size:14px;line-height:18px;font-weight:600;color:var(--text-2)}
.pf-panel .h-l{font-variant-numeric:tabular-nums}
.pf-tx{display:flex;flex-direction:column;gap:8px;padding-bottom:8px;border-bottom:1px solid #eeeef0}
.pf-tx:last-child{padding-bottom:0;border-bottom:0}
.pf-tx-r{display:flex;align-items:center;gap:12px;font-size:16px;line-height:20px;font-weight:700}
.pf-tx-r span{flex:1;min-width:0}
.pf-tx-r b{font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}
.pf-tx-r b.pf-mut{color:var(--text-2)}
.pf-tx-r b.pf-ok{color:#17845a}
.pf-tx small{font-size:12px;line-height:15px;font-weight:500;color:var(--text-2);white-space:pre-wrap}
.pf-tx small.pf-bad{color:#c93842}
.pf-tx.pf-new{animation:pf-newtx 1.6s var(--ease)}
@keyframes pf-newtx{0%{background:#f1e9ff;box-shadow:0 0 0 8px #f1e9ff}100%{background:transparent;box-shadow:0 0 0 8px transparent}}
.pf-tx-empty{text-align:center;padding:12px 0;color:var(--text-2);font-size:14px;line-height:18px}
