/* Т-Скупка — личный кабинет, избранное, шапка с входом */
.top-r{display:flex;align-items:center;gap:8px}
.top-me{position:relative;display:flex;align-items:center;gap:8px;padding:8px 14px 8px 11px;border-radius:14px;background:var(--lime);color:var(--ink);text-decoration:none;font:700 13.5px/1 var(--f-body);transition:scale .15s var(--ease),box-shadow .2s}
.top-me svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.top-me .av{display:grid;place-items:center;width:24px;height:24px;margin:-3px 0 -3px -4px;border-radius:50%;background:var(--ink);color:var(--lime);font:800 12.5px/1 var(--f-body)}
.top-me .av[hidden]{display:none}
.top-me.in{background:rgba(255,255,255,.1);color:#fff;box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.22)}.top-me.in .av{background:var(--lime);color:var(--ink)}
.top-me:active{scale:.96}
@media(hover:hover){.top-me:hover{box-shadow:0 0 0 4px rgba(255,210,63,.3)}}
.top-me i{position:absolute;top:-6px;right:-4px;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:#ff4d5e;color:#fff;font:800 11.5px/20px var(--f-body);font-style:normal;text-align:center}
.top-me i[hidden]{display:none}
@media(max-width:430px){.top-me b{display:none}.top-me{padding:9px}.top-me .av{margin:0}.top-chat span{display:none}}

.fav{position:absolute;top:10px;right:10px;z-index:3;display:grid;place-items:center;width:38px;height:38px;padding:0;border:0;border-radius:50%;background:rgba(12,13,16,.55);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);color:#fff;transition:scale .18s var(--ease),background .2s}
.fav svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linejoin:round}
.fav.on{background:var(--lime);color:var(--ink)}.fav.on svg{fill:currentColor}
.fav:active{scale:.9}
@media(hover:hover){.fav:hover{background:rgba(12,13,16,.8)}.fav.on:hover{background:var(--lime)}}
.fav.pop svg{animation:favpop .5s var(--ease)}
@keyframes favpop{0%{scale:.5}55%{scale:1.35}100%{scale:1}}
.media{position:relative}
.item-act{display:flex;align-items:center;gap:8px}
.fav.big{position:static;width:44px;height:44px;border:1.5px solid var(--line);background:var(--card);color:var(--ink)}
.fav.big.on{background:var(--lime);border-color:var(--lime)}

#toast{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom));z-index:90;display:flex;align-items:center;gap:14px;max-width:min(92vw,460px);padding:13px 16px;border-radius:16px;background:var(--ink);color:#fff;font:600 14px/1.3 var(--f-body);box-shadow:0 18px 44px -12px rgba(0,0,0,.6);translate:-50% 30px;opacity:0;pointer-events:none;transition:translate .3s var(--ease),opacity .25s}
#toast.on{translate:-50% 0;opacity:1;pointer-events:auto}
#toast button{flex:none;padding:7px 13px;border:0;border-radius:10px;background:var(--lime);color:var(--ink);font:700 13px/1 var(--f-body)}

.me{padding:20px 0 60px;background:var(--paper);min-height:70vh}
.me .shell{max-width:1040px;margin:0 auto;padding:0 var(--gut,16px)}
.me-load{padding:60px 0;text-align:center;color:var(--tx2)}

.auth{display:grid;grid-template-columns:1fr minmax(0,440px);gap:clamp(20px,5vw,64px);align-items:start;margin-top:18px}
.auth-pitch h1{margin:0 0 8px;font:700 clamp(30px,4.4vw,52px)/1.02 var(--f-disp);letter-spacing:-.03em}
.auth-pitch>p{margin:0 0 22px;max-width:36ch;font-size:17px;color:var(--tx2)}
.auth-pitch ul{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.auth-pitch li{display:flex;gap:14px;align-items:flex-start;padding:14px 16px;border-radius:18px;background:var(--card);border:1px solid var(--line)}
.auth-pitch li i{flex:none;display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:var(--ink);color:var(--lime)}
.auth-pitch li svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.auth-pitch li b{display:block;font:700 15.5px/1.2 var(--f-body)}
.auth-pitch li small{display:block;margin-top:3px;color:var(--tx2);font-size:13.5px}
.auth-form{display:flex;flex-direction:column;gap:14px;padding:22px;border-radius:24px;background:var(--card);border:1px solid var(--line);box-shadow:0 24px 50px -30px rgba(0,0,0,.35)}
.seg{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;border-radius:14px;background:var(--ground)}
.seg button{height:42px;border:0;border-radius:11px;background:none;font:700 14.5px/1 var(--f-body);color:var(--tx2);transition:background .2s,color .2s}
.seg button.on{background:var(--ink);color:#fff}
.auth-form label,.prof label{display:flex;flex-direction:column;gap:6px;font:600 13.5px/1.2 var(--f-body);color:var(--tx2)}
.auth-form label em,.prof label em{font-style:normal;font-weight:500;color:var(--tx3)}
.auth-form input,.prof input{height:50px;padding:0 15px;border-radius:14px;border:1.5px solid var(--line);background:var(--paper);font:500 16px var(--f-body);color:var(--tx);outline:0;transition:border-color .18s,box-shadow .18s}
.auth-form input:focus,.prof input:focus{border-color:var(--ink);box-shadow:0 0 0 4px rgba(255,210,63,.55)}
.prof input:disabled{opacity:.6}
.auth-form small,.prof small{font-weight:500;font-size:12.5px;color:var(--tx3)}
.auth-note{display:flex;gap:10px;margin:0;font-size:12.5px;color:var(--tx3)}
.auth-note svg{flex:none;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.auth-form .btn{height:54px;justify-content:center}
.auth-form .chat-err:empty,.prof .chat-err:empty{display:none}
.hp{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}

.me-head{display:flex;align-items:center;gap:16px;margin:12px 0 18px}
.me-av{display:grid;place-items:center;width:64px;height:64px;border-radius:22px;background:var(--ink);color:var(--lime);font:800 28px/1 var(--f-body);box-shadow:0 0 0 4px var(--lime)}
.me-head h1{margin:0;font:700 clamp(24px,3.4vw,34px)/1.05 var(--f-disp);letter-spacing:-.02em}
.me-head small{color:var(--tx2);font-size:14px}
.me-tabs{display:flex;gap:6px;padding:5px;margin-bottom:20px;border-radius:18px;background:var(--ground);width:fit-content;max-width:100%;overflow-x:auto;scrollbar-width:none}
.me-tabs::-webkit-scrollbar{display:none}
.me-tabs button{display:flex;align-items:center;gap:8px;height:44px;padding:0 18px;border:0;border-radius:14px;background:none;font:700 14.5px/1 var(--f-body);color:var(--tx2);white-space:nowrap;transition:background .2s,color .2s}
.me-tabs button.on{background:var(--ink);color:#fff}
.me-tabs i{min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:var(--lime);color:var(--ink);font:800 11.5px/20px var(--f-body);font-style:normal;text-align:center}
.me-tabs i[hidden]{display:none}
.me-empty{display:flex;flex-direction:column;align-items:center;gap:6px;padding:56px 20px;text-align:center;border-radius:26px;background:var(--card);border:1.5px dashed var(--line)}
.me-empty>svg{width:46px;height:46px;fill:none;stroke:var(--tx3);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;margin-bottom:6px}
.me-empty h2{margin:0;font:700 22px/1.1 var(--f-body)}
.me-empty p{margin:0 0 14px;max-width:38ch;color:var(--tx2)}
.me-h{margin:22px 0 10px;font:800 13px/1 var(--f-body);letter-spacing:.08em;text-transform:uppercase;color:var(--tx3)}
.fav-gone{margin-top:26px}
.fav-gone h3{margin:0 0 10px;font:800 13px/1 var(--f-body);letter-spacing:.08em;text-transform:uppercase;color:var(--tx3)}
.fg{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;margin-bottom:8px;border-radius:14px;background:var(--card);border:1px solid var(--line)}
.fg span{display:flex;align-items:center;gap:10px;color:var(--tx2);font-size:14px}
.fg svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.fg b{font-weight:600}
.fg button{flex:none;padding:8px 13px;border:1.5px solid var(--line);border-radius:10px;background:none;font:700 13px/1 var(--f-body)}

.thr-list{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(min(100%,430px),1fr))}
.thr{overflow:hidden;border-radius:22px;background:var(--card);border:1.5px solid var(--line);transition:border-color .2s,box-shadow .2s}
.thr.new{border-color:var(--ink);box-shadow:0 0 0 3px var(--lime)}
.thr.held{border-color:var(--ink)}
.thr-main{display:flex;align-items:center;gap:14px;width:100%;padding:12px 14px 12px 12px;border:0;background:none;text-align:left;font:inherit;color:inherit;transition:background .15s}
@media(hover:hover){.thr-main:hover{background:var(--paper)}}
.thr-ph{flex:none;width:76px;border-radius:16px;overflow:hidden}
.thr-ph .ph{display:block;aspect-ratio:1/1.1;border-radius:16px}
.thr-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.thr-t{display:flex;align-items:center;gap:8px}
.thr-t b{font:700 15.5px/1.25 var(--f-body);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.thr-t .dot{flex:none;min-width:21px;height:21px;padding:0 6px;border-radius:11px;background:#ff4d5e;color:#fff;font:800 12px/21px var(--f-body);font-style:normal;text-align:center}
.thr-pr{font:800 15px/1 var(--f-body)}
.thr-pr em{font-style:normal;color:#d23c4d;font-weight:700}
.thr-body small{color:var(--tx2);font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.thr time{flex:none;align-self:flex-start;color:var(--tx3);font-size:12.5px}
.thr-bk{display:flex;align-items:center;gap:12px;padding:12px 14px;border-top:1px solid var(--line);background:var(--paper)}
.thr-bk .ico{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:var(--ground);color:var(--tx2)}
.thr-bk .ico svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round}
.thr-bk div{flex:1;min-width:0}
.thr-bk b{display:block;font:700 14px/1.25 var(--f-body)}
.thr-bk small{display:flex;align-items:center;gap:5px;margin-top:3px;color:var(--tx2);font-size:12.5px}
.thr-bk small svg{flex:none;width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2}
.thr-bk button{flex:none;padding:9px 14px;border:1.5px solid var(--ink);border-radius:11px;background:none;font:700 13px/1 var(--f-body);transition:background .15s,color .15s}
@media(hover:hover){.thr-bk button:hover{background:var(--ink);color:#fff}}
.thr-bk.ok{background:#f2fbd0}
.thr-bk.ok .ico,.thr-bk.wait .ico{background:var(--lime);color:var(--ink)}
.thr-bk.wait{background:#fff6d6}
.thr-bk.off{opacity:.8}

.prof{display:grid;gap:8px;max-width:520px}
.prof section{display:grid;gap:12px}
.prof-act{display:flex;gap:10px;margin-top:8px}
.prof-act .btn{height:50px}
@media(max-width:860px){.auth{grid-template-columns:1fr}.auth-pitch{order:2}}

@media(max-width:480px){.me-tabs{width:100%}.me-tabs button{flex:1;justify-content:center;padding:0 10px}}

/* страница входа: обе колонки одной высоты и выровнены по верхнему и нижнему краю */
.auth{align-items:stretch!important}
.auth-pitch{display:flex;flex-direction:column}
.auth-pitch ul{flex:1;grid-auto-rows:1fr}
.auth-pitch li{align-items:center}
.auth-form{justify-content:center}
@media(max-width:860px){.auth-pitch ul{grid-auto-rows:auto}}

.auth-form label .lab{display:block}.auth-form label .lab em{margin-left:4px}
/* без прыжков при переключении Вход / Регистрация */
.auth{align-items:start!important}
.auth-pitch ul{grid-auto-rows:auto!important;flex:none!important}
.auth-pitch li{align-items:flex-start!important}
.auth-form{justify-content:flex-start!important}
@media(min-width:900px){.auth-form{min-height:700px}}
.auth-form label .lab,.auth-form label .lab em{display:inline!important}
/* ровная сетка: колонки одной высоты, карточки равные, высота постоянна при переключении */
@media(min-width:900px){
  .auth{align-items:stretch!important}
  .auth-form{min-height:700px;justify-content:flex-start!important}
  .auth-pitch{display:flex;flex-direction:column}
  .auth-pitch h1{margin-top:0}
  .auth-pitch ul{flex:1!important;grid-auto-rows:1fr!important}
  .auth-pitch li{align-items:center!important}
}
/* всё помещается на экране: высота от окна, без растягивания страницы */
@media(min-width:900px){
  .auth{height:clamp(660px,calc(100dvh - 250px),740px);grid-template-rows:minmax(0,1fr)}
  .auth-form{min-height:0!important;height:100%;justify-content:flex-start!important}
  .auth-pitch{min-height:0;height:100%}
  .auth-pitch ul{min-height:0;grid-auto-rows:minmax(0,1fr)!important}
  .auth-pitch li{min-height:0}
}
@media(min-width:900px){
  .auth{height:clamp(640px,calc(100dvh - 290px),700px);margin-top:6px}
  .auth-form{gap:11px;padding:18px 22px}
  .auth-form input{height:46px}
  .auth-form .btn{height:50px}
}
@media(min-width:900px){
  .auth{height:clamp(530px,calc(100dvh - 270px),700px)}
  .auth-form{gap:clamp(7px,1.5vh,11px);padding:clamp(12px,2vh,18px) 22px}
  .auth-form input{height:clamp(40px,5.4vh,46px)}
  .auth-form .btn{height:clamp(44px,5.6vh,50px)}
  .auth-pitch>p{margin-bottom:clamp(10px,2vh,22px)}
  .auth-pitch li{padding:10px 16px}
}
@media(min-width:900px){.auth-form{justify-content:space-between!important;gap:6px}.auth-form .chat-err:empty{display:none}}
@media(min-width:900px){.auth-form.login{justify-content:flex-start!important;gap:16px}.auth-form.login>label:first-of-type{margin-top:auto}.auth-form.login>label:last-of-type{margin-bottom:auto}}

/* --- удаление обращений и архив (30 дней) --- */
.thr{position:relative}
.thr.has-del .thr-main{padding-right:58px}
.thr-del{position:absolute;right:10px;bottom:10px;display:grid;place-items:center;width:38px;height:38px;border:0;border-radius:12px;background:transparent;color:var(--tx3);transition:background .15s,color .15s}
.thr-del svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
@media(hover:hover){.thr-del:hover{background:#ffe9ec;color:#d23c4d}}
.thr-del:active{background:#ffe9ec;color:#d23c4d}
.thr-del:disabled,.thr-back:disabled{opacity:.5}
.thr .thr-bk~.thr-del{bottom:auto;top:10px}
.me-arch{margin-top:26px;border-top:1px solid var(--line);padding-top:6px}
.me-arch summary{display:flex;align-items:center;gap:10px;padding:12px 2px;font:800 16px/1 var(--f-body);cursor:pointer;list-style:none;color:var(--tx2)}
.me-arch summary::-webkit-details-marker{display:none}
.me-arch summary::before{content:"";width:9px;height:9px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);transition:transform .2s}
.me-arch[open] summary::before{transform:rotate(45deg)}
.me-arch summary i{font-style:normal;min-width:22px;height:22px;padding:0 7px;border-radius:11px;background:var(--ground);font:700 12.5px/22px var(--f-body);text-align:center}
.me-arch>.muted{margin:0 0 12px;font-size:13px;color:var(--tx3)}
.thr.arch{display:flex;align-items:center;gap:10px;background:var(--paper);border-style:dashed}
.thr.arch .thr-main{flex:1;min-width:0;padding:12px 4px 12px 14px}
.thr-left{margin-top:2px;font:700 12.5px/1 var(--f-body);color:#9a5a00}
.thr-back{flex:none;margin-right:12px;padding:9px 14px;border:1.5px solid var(--ink);border-radius:11px;background:none;font:700 13px/1 var(--f-body);transition:background .15s,color .15s}
@media(hover:hover){.thr-back:hover{background:var(--ink);color:#fff}}

.auth-guest{margin:14px 0 0;padding:12px 14px;border-radius:14px;background:#fff6d6;color:#6b4a00;font-size:13.5px;line-height:1.4}


/* ===== 18: подтверждение почты кодом и сброс пароля ===== */
.auth-h{margin:0 0 6px;font:800 22px/1.2 var(--f-display,var(--f-body))}
.auth-hint{margin:0 0 14px;color:#5b5f6a;font-size:14px;line-height:1.45}
.auth-hint b{color:#0c0d10;overflow-wrap:anywhere}
.auth-form input[name=code]{font-size:26px;letter-spacing:.35em;text-align:center;font-variant-numeric:tabular-nums}
.auth-link{display:block;margin:12px auto 0;padding:8px 12px;border:0;background:none;color:#5b5f6a;font:600 14px/1 var(--f-body);cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.auth-link:hover{color:#0c0d10}


/* ===== 19: удаление кабинета ===== */
.prof-del{margin-top:28px;padding-top:22px;border-top:1px solid rgba(12,13,16,.12)}
.prof-del p{margin:0 0 14px;color:#5b5f6a;font-size:14px;line-height:1.5;max-width:520px}
.btn.dng{background:#fff;color:#c4283a;border:1.5px solid #e8a3ab;box-shadow:none}
.btn.dng:hover{background:#fdecee}
.prof-del .btn.dng#del-go{background:#c4283a;color:#fff;border-color:#c4283a}
