:root{
  --bg:#f4f6fa;
  --navy:#164867;
  --ink:#0c101a;
  --text:#1f3a52;
  --muted:#6a7f95;
  --blue:#4994e3;
  --blue-strong:#2d6bff;
  --blue-btn:#0059ff;
  --sky:#e0f3ff;
  --green:#3cc28f;
  --safe-b:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{background:var(--bg);height:100%}
body{font-family:'Montserrat',system-ui,-apple-system,sans-serif;color:var(--ink);overscroll-behavior:none}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

.app{position:relative;max-width:430px;margin:0 auto;min-height:100vh;background:var(--bg);overflow-x:hidden}

/* ---------- вкладки ---------- */
.tab{display:none;padding:0 13px}
.tab.active{display:block;animation:fade .25s ease}
@keyframes fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.bottom-space{height:calc(150px + var(--safe-b))}

/* ---------- шапка ---------- */
.top{display:flex;align-items:center;justify-content:space-between;padding-top:33px}
.logo{width:120px;height:auto;display:block;margin-left:-1px}
.bell-btn{width:38px;height:38px;border-radius:50%;background:var(--blue);color:#fff;display:grid;place-items:center;margin-right:-1px;box-shadow:0 4px 12px rgba(73,148,227,.35)}
.bell-btn svg{width:19px;height:19px;stroke-width:2}

/* ---------- баланс ---------- */
.balance-label{margin-top:24px;font-size:13px;font-weight:500;color:#33465a;display:flex;align-items:center;gap:6px}
.eye{color:#5f7184;display:grid;place-items:center}
.eye svg{width:15px;height:15px}
.balance-row{display:flex;align-items:flex-end;justify-content:space-between;margin-top:1px}
.balance{font-weight:800;letter-spacing:-1px;line-height:1}
.b-int{font-size:44px;color:var(--ink)}
.b-dec{font-size:34px;color:#8b97a6;margin-left:1px}
.balance.hidden .b-int,.balance.hidden .b-dec{filter:blur(9px)}
.status{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:var(--green);padding:5px 10px;border-radius:20px;margin-bottom:2px}
.status i{width:6px;height:6px;border-radius:50%;background:var(--green)}
.status.frozen{color:#7d8ea0}
.status.frozen i{background:#9fb0c0}

/* ---------- карта ---------- */
.card{position:relative;overflow:hidden;margin-top:28px;height:215px;border-radius:24px;padding:20px 22px 22px;color:#fff;cursor:pointer;
  background:linear-gradient(135deg,#bfe0f9 0%,#9fc7fb 30%,#6d97ff 62%,#2e5cff 100%);
  box-shadow:0 14px 30px rgba(46,92,255,.22);transition:filter .3s,transform .15s}
.card:active{transform:scale(.985)}
.card.frozen{filter:grayscale(.85) brightness(1.05)}
.card-arc{position:absolute;left:44%;top:56%;width:120%;height:150%;border-radius:120px 0 0 0;
  background:linear-gradient(160deg,rgba(255,255,255,.28),rgba(255,255,255,.05) 45%);pointer-events:none}
.card-arc::after{content:"";position:absolute;left:34px;top:34px;right:0;bottom:0;border-radius:90px 0 0 0;background:linear-gradient(135deg,#4a7cff,#2d5cff)}
.card>*:not(.card-arc):not(.card-bottom){position:relative}
.card-top{display:flex;justify-content:space-between;align-items:center}
.card-brand{font-size:20px;font-weight:700;letter-spacing:-.3px}
.card-plan{font-size:12px;font-weight:600;padding:6px 10px;border-radius:14px;background:rgba(255,255,255,.28);border:1px solid rgba(255,255,255,.55)}
.card-mid{display:flex;align-items:center;gap:30px;margin-top:33px}
.chip{width:31px;height:31px;border-radius:7px;background:linear-gradient(135deg,#f0d79a,#c9a560 55%,#e7cb87)}
.globe{width:20px;height:20px;color:#fff;stroke-width:1.5}
.card-bottom{position:absolute;left:22px;right:22px;bottom:22px;display:flex;justify-content:space-between;align-items:flex-end}
.card-num{font-size:17px;font-weight:700;letter-spacing:.5px}
.card-exp{font-size:12px;font-weight:500;opacity:.9;margin-top:9px}
.visa{font-size:22px;font-weight:800;letter-spacing:.5px;margin-bottom:2px}

/* ---------- кнопки действий ---------- */
.actions{display:flex;justify-content:space-between;margin-top:25px;padding:0 1px}
.action{width:110px;display:flex;flex-direction:column;align-items:center;gap:10px}
.a-circle{width:60px;height:60px;border-radius:50%;background:#fff;display:grid;place-items:center;color:#1c2633;box-shadow:0 6px 16px rgba(22,72,103,.08)}
.a-circle.primary{background:var(--blue-strong);color:#fff;box-shadow:0 8px 18px rgba(45,107,255,.35)}
.a-circle svg{width:20px;height:20px}
.a-label{font-size:12px;font-weight:500;color:#14202c}
.action:active .a-circle{transform:scale(.94)}

/* ---------- секции ---------- */
.section-title{font-size:22px;font-weight:700;color:var(--navy);margin:34px 0 12px -5px}
.tiles{display:flex;gap:10px;margin-left:-5px}
.tiles.scroll{overflow-x:auto;margin-right:-13px;padding-right:13px;scrollbar-width:none}
.tiles.scroll::-webkit-scrollbar{display:none}
.tile{flex:0 0 110px;display:flex;flex-direction:column;align-items:center;gap:10px}
.tile img{width:110px;height:138px;object-fit:cover;border-radius:16px;display:block}
.tile span{font-size:12.5px;font-weight:500;color:#14202c;text-align:center;line-height:1.3}
.tile:active img{transform:scale(.97)}
.center{display:flex;justify-content:center;margin-top:20px}
.pill-btn{background:var(--blue-btn);color:#fff;font-size:13px;font-weight:600;padding:13px 18px;border-radius:24px;box-shadow:0 6px 16px rgba(0,89,255,.25)}

/* ---------- нижнее меню ---------- */
.tabbar{position:fixed;z-index:20;left:50%;transform:translateX(-50%);bottom:0;width:100%;max-width:430px;
  height:calc(122px + var(--safe-b));background:var(--sky);border-radius:44px 44px 0 0;
  border-top:1px solid #c9dceb;box-shadow:0 -6px 20px rgba(22,72,103,.06);
  display:flex;justify-content:space-between;align-items:flex-start;padding:46px 40px 0}
.tb-item{display:flex;flex-direction:column;align-items:center;gap:5px;color:#3e6a85;font-size:12px;font-weight:500;width:60px}
.tb-item svg{width:24px;height:24px;stroke-width:1.7}
.tb-item.active{color:#579de6}
.tb-center{position:absolute;left:50%;top:6px;transform:translateX(-50%)}
.tb-ring{display:grid;place-items:center;width:92px;height:92px;border-radius:50%;background:#fff;box-shadow:0 0 0 1px #c9dceb}
.tb-core{width:80px;height:80px;border-radius:50%;background:var(--navy);color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:12px;font-weight:600;transition:background .2s}
.tb-core svg{width:26px;height:26px;stroke-width:1.7}
.tb-center.active .tb-core{background:#1d5c85}
.tb-center:active .tb-core{transform:scale(.95)}
.home-ind{position:absolute;left:50%;bottom:calc(14px + var(--safe-b));transform:translateX(-50%);width:122px;height:4px;border-radius:3px;background:#d0dbe8}
body.in-tg .home-ind{display:none}

/* ---------- страницы ---------- */
.page{position:fixed;inset:0;z-index:30;max-width:430px;margin:0 auto;background:var(--bg);padding:24px 12px 40px;overflow-y:auto;transform:translateX(100%);transition:transform .3s cubic-bezier(.2,.8,.2,1);visibility:hidden}
.page.open{transform:none;visibility:visible}
.close-link{color:#54b3ed;font-size:16px;font-weight:500;padding:2px 0 0 0}
body.in-tg .close-link{display:none}
.big-title{font-size:33px;font-weight:800;color:var(--navy);margin-top:36px;letter-spacing:-.3px}
body.in-tg .big-title{margin-top:12px}
.empty{display:flex;flex-direction:column;align-items:center;text-align:center;margin-top:58px}
.empty svg{width:30px;height:30px;color:#9fb0bf;stroke-width:1.5}
.e-t{font-size:14px;font-weight:500;color:#1f3a52;margin-top:14px}
.e-s{font-size:11.5px;color:#b5c0c8;margin-top:18px}

.page-title{font-size:28px;font-weight:800;color:var(--navy);padding-top:30px}
.sub-title{font-size:16px;font-weight:700;color:var(--navy);margin:24px 0 10px}
.sub-title.in-sheet{margin:22px 0 10px}

/* списки */
.list{background:#fff;border-radius:20px;margin-top:16px;overflow:hidden}
.row{display:flex;align-items:center;gap:12px;width:100%;padding:14px 16px;text-align:left;font-size:14px;font-weight:500;color:#14202c}
.row+.row{border-top:1px solid #eef1f5}
.row-ic{width:36px;height:36px;border-radius:12px;background:#eef4ff;color:var(--blue);display:grid;place-items:center;flex:none}
.row-ic svg{width:18px;height:18px}
.row-t{flex:1}
.row-v{color:var(--muted);font-size:13px}
.chev{width:8px;height:8px;border-right:2px solid #b4c1cd;border-top:2px solid #b4c1cd;transform:rotate(45deg);margin-right:4px}
.switch{position:relative;width:46px;height:28px;flex:none}
.switch input{display:none}
.switch i{position:absolute;inset:0;border-radius:20px;background:#d6dee6;transition:.2s}
.switch i::after{content:"";position:absolute;left:3px;top:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.2);transition:.2s}
.switch input:checked+i{background:var(--blue)}
.switch input:checked+i::after{transform:translateX(18px)}

.box{background:#fff;border-radius:20px;padding:16px}
.limit{display:flex;justify-content:space-between;font-size:13px;color:var(--muted)}
.limit b{color:#14202c;font-weight:600}
.bar{height:6px;border-radius:4px;background:#eef1f5;margin:10px 0 16px;overflow:hidden}
.bar i{display:block;height:100%;background:var(--blue);border-radius:4px}
.empty-small{display:flex;flex-direction:column;align-items:center;gap:8px;padding:26px 16px;color:#9fb0bf;font-size:13px}
.empty-small svg{width:26px;height:26px;stroke-width:1.5}
.empty-small span{color:var(--text)}

.card.big{margin-top:18px}

/* профиль */
.profile-head{display:flex;align-items:center;gap:14px;margin-top:20px}
.avatar{width:62px;height:62px;border-radius:50%;background:linear-gradient(135deg,#7fb6f0,#2d6bff);color:#fff;font-size:24px;font-weight:700;display:grid;place-items:center;overflow:hidden;flex:none}
.avatar img{width:100%;height:100%;object-fit:cover}
.p-name{font-size:18px;font-weight:700;color:var(--navy)}
.p-sub{font-size:12.5px;color:var(--muted);margin-top:4px}

/* тарифы */
.tariff{display:flex;flex-wrap:wrap;gap:14px;background:#fff;border-radius:22px;padding:14px;margin-top:16px;border:2px solid transparent}
.tariff.current{border-color:var(--blue)}
.tariff img,.t-art{width:76px;height:96px;border-radius:14px;object-fit:cover;flex:none}
.t-art{display:grid;place-items:center;color:#fff;font-weight:800;font-size:18px}
.t-art.lite{background:linear-gradient(135deg,#bfe0f9,#6d97ff)}
.t-art.master{background:linear-gradient(135deg,#2a3550,#0c101a)}
.t-body{flex:1;min-width:0}
.t-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.t-head b{font-size:15px;color:#14202c}
.t-badge{font-size:10.5px;font-weight:600;color:var(--blue);background:#eef4ff;padding:4px 8px;border-radius:10px;white-space:nowrap}
.t-desc{font-size:12px;color:var(--muted);line-height:1.4;margin-top:6px}
.t-price{font-size:18px;font-weight:800;color:var(--navy);margin-top:8px}
.t-price small{font-size:12px;font-weight:500;color:var(--muted)}
.t-btn{width:100%;background:var(--blue-btn);color:#fff;font-size:13px;font-weight:600;padding:12px;border-radius:22px}

/* ---------- шторки ---------- */
.overlay{position:fixed;inset:0;z-index:40;background:rgba(10,10,12,.76);opacity:0;visibility:hidden;transition:opacity .25s,visibility .25s}
.overlay.open{opacity:1;visibility:visible}
.sheet{position:fixed;z-index:50;left:50%;bottom:0;width:100%;max-width:430px;max-height:88vh;overflow-y:auto;
  background:#fff;border-radius:28px 28px 0 0;padding:10px 17px calc(36px + var(--safe-b));
  transform:translate(-50%,105%);transition:transform .32s cubic-bezier(.2,.8,.2,1)}
.sheet.open{transform:translate(-50%,0)}
.handle{width:40px;height:4px;border-radius:3px;background:#dcdee2;margin:0 auto 20px}
.sh-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.sh-title{font-size:21px;font-weight:600;color:#0c101a;margin-top:4px}
.sh-sub{font-size:12px;color:#55667a;margin-top:4px}
.sh-close{width:44px;height:44px;border-radius:50%;background:var(--bg);display:grid;place-items:center;color:#2a2e37;flex:none}
.sh-close svg{width:18px;height:18px;stroke-width:2}
.codes-body{min-height:150px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:16px;font-weight:500;color:#14202c;text-align:center}
.code-timer{font-size:12px;color:var(--muted);margin-top:12px;font-weight:500}
.spinner{width:30px;height:30px;border-radius:50%;border:3px solid #dbe8f7;border-top-color:var(--blue);animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.main-btn.loading{opacity:.6;pointer-events:none}
.info{display:flex;align-items:center;gap:12px;background:#eef4ff;border-radius:22px;padding:15px 16px;font-size:12.5px;color:#4a5a6a;font-weight:500;margin-top:10px}
.info svg{width:17px;height:17px;color:var(--blue-strong);flex:none}
.main-btn{display:block;width:100%;margin-top:16px;background:var(--blue);color:#fff;font-size:14px;font-weight:600;height:44px;border-radius:22px;box-shadow:0 6px 14px rgba(73,148,227,.3)}
.main-btn:active,.pill-btn:active,.t-btn:active{filter:brightness(.92)}

/* реквизиты */
.req{margin-top:20px;display:flex;flex-direction:column;gap:10px}
.req-2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.req-row{display:flex;align-items:center;justify-content:space-between;gap:8px;background:var(--bg);border-radius:16px;padding:12px 14px}
.req-row span{display:block;font-size:11.5px;color:var(--muted);font-weight:500}
.req-row b{display:block;font-size:14.5px;font-weight:600;color:#14202c;margin-top:4px;word-break:break-word}
.copy{width:34px;height:34px;border-radius:10px;background:#fff;color:var(--blue);display:grid;place-items:center;flex:none}
.copy svg{width:17px;height:17px}

/* пополнение */
.amount{display:flex;align-items:center;justify-content:center;gap:4px;margin-top:26px;font-size:40px;font-weight:800;color:var(--navy)}
.amount input{width:5ch;border:0;outline:0;background:none;font:inherit;color:inherit;text-align:left}
.amount input::placeholder{color:#c3ccd6}
.amount-hint{text-align:center;font-size:12px;color:var(--muted);margin-top:4px}
.chips{display:flex;gap:8px;justify-content:center;margin-top:16px}
.chips button,.denoms button{padding:9px 14px;border-radius:16px;background:var(--bg);font-size:13px;font-weight:600;color:var(--navy);transition:.15s}
.chips button.active,.denoms button.active{background:var(--blue);color:#fff}
.methods{display:flex;flex-direction:column;gap:8px;margin-top:20px}
.method{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:16px;background:var(--bg);font-size:13.5px;font-weight:500;color:#14202c;text-align:left;border:2px solid transparent}
.method span:nth-child(2){flex:1}
.method i{width:18px;height:18px;border-radius:50%;border:2px solid #c4cfda}
.method.active{border-color:var(--blue);background:#fff}
.method.active i{border:5px solid var(--blue)}
.m-ic{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;font-size:10.5px;font-weight:800;color:#fff;flex:none}
.m-ic.sbp{background:linear-gradient(135deg,#5b57d1,#1fa463)}
.m-ic.rf{background:#2d6bff;font-size:16px}
.m-ic.usdt{background:#26a17b;font-size:16px}

/* товар */
.prod-head{display:flex;gap:12px;align-items:center}
.prod-head img{width:48px;height:60px;border-radius:10px;object-fit:cover}
.denoms{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.denoms button{padding:12px 6px}

/* тост */
.toast{position:fixed;z-index:60;left:50%;top:20px;transform:translate(-50%,-140%);background:#14202c;color:#fff;font-size:13px;font-weight:500;padding:11px 16px;border-radius:14px;max-width:90%;text-align:center;transition:transform .3s cubic-bezier(.2,.8,.2,1);box-shadow:0 8px 24px rgba(0,0,0,.2)}
.toast.show{transform:translate(-50%,0)}
