/* HJ Squad — Phase 17 final UI/UX polish layer */
:root{
  --hj-bg:#050308;--hj-surface:#0f0a18;--hj-surface-2:#151020;
  --hj-border:rgba(196,148,255,.16);--hj-border-strong:rgba(196,148,255,.32);
  --hj-text:#f4f1fb;--hj-muted:#a89fba;--hj-accent:#8b5cf6;--hj-accent-2:#c49bff;
  --hj-danger:#ef4444;--hj-success:#22c55e;--hj-warning:#f59e0b;
  --hj-r-sm:10px;--hj-r:16px;--hj-r-lg:22px;
  --hj-shadow:0 18px 60px rgba(0,0,0,.34);--hj-ease:cubic-bezier(.2,.8,.2,1);
}
html{scroll-behavior:smooth;color-scheme:dark}
body{font-family:'Vazirmatn',Tahoma,Arial,sans-serif!important;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;min-height:100vh}
body::selection{background:rgba(139,92,246,.42);color:#fff}
a,button,input,select,textarea{-webkit-tap-highlight-color:transparent}
a,button{transition:transform .18s var(--hj-ease),border-color .18s var(--hj-ease),background-color .18s var(--hj-ease),box-shadow .18s var(--hj-ease),opacity .18s var(--hj-ease)}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--hj-accent-2)!important;outline-offset:3px!important}
button,.btn,[role="button"]{touch-action:manipulation}
button:not(:disabled):active,.btn:not(.disabled):active{transform:translateY(1px) scale(.99)}
button:disabled,.btn.disabled{opacity:.48!important;cursor:not-allowed!important;filter:saturate(.65)}
input,select,textarea{font:inherit!important;transition:border-color .2s ease,box-shadow .2s ease,background .2s ease}
input:focus,select:focus,textarea:focus{border-color:rgba(196,148,255,.55)!important;box-shadow:0 0 0 3px rgba(139,92,246,.12)!important}
input::placeholder,textarea::placeholder{color:#746c84!important;opacity:1}
.card,.panel,.box,.ticket,.item{backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.card{box-shadow:0 1px 0 rgba(255,255,255,.025) inset,0 18px 55px rgba(0,0,0,.18)}
.card:hover{border-color:var(--hj-border-strong)}
.table, .tablewrap{border-radius:12px;overflow:auto;scrollbar-width:thin;scrollbar-color:#42335b transparent}
table{font-variant-numeric:tabular-nums}
thead th{position:sticky;top:0;z-index:2;background:rgba(13,11,20,.96);backdrop-filter:blur(12px)}
tbody tr{transition:background .16s ease}tbody tr:hover{background:rgba(139,92,246,.045)}
.tag,.pill,.badge{white-space:nowrap}
.msg:not(:empty){animation:hjFadeUp .25s var(--hj-ease)}
.empty{min-height:92px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px}
img{max-width:100%;height:auto}
hr{border:0;border-top:1px solid var(--hj-border)}
*{scrollbar-width:thin;scrollbar-color:#403252 transparent}
*::-webkit-scrollbar{width:8px;height:8px}*::-webkit-scrollbar-thumb{background:#403252;border-radius:999px}*::-webkit-scrollbar-track{background:transparent}
.hj-skip{position:fixed;right:16px;top:-60px;z-index:9999;background:#fff;color:#0a0610;padding:10px 14px;border-radius:10px;font-weight:800;text-decoration:none;transition:top .2s ease}.hj-skip:focus{top:12px}
.hj-toast-root{position:fixed;left:18px;bottom:18px;z-index:9998;display:grid;gap:8px;max-width:min(390px,calc(100vw - 36px));pointer-events:none}
.hj-toast{background:rgba(17,13,25,.96);border:1px solid var(--hj-border-strong);border-radius:13px;padding:11px 14px;color:var(--hj-text);box-shadow:var(--hj-shadow);font-size:13px;line-height:1.75;animation:hjToastIn .25s var(--hj-ease);pointer-events:auto}
.hj-toast.success{border-color:rgba(34,197,94,.35)}.hj-toast.error{border-color:rgba(239,68,68,.4)}
.hj-page-ready{animation:hjPageIn .35s var(--hj-ease)}
@keyframes hjPageIn{from{opacity:.01}to{opacity:1}}@keyframes hjFadeUp{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}@keyframes hjToastIn{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}
@media (hover:hover) and (pointer:fine){.btn:not(:disabled):hover,button:not(:disabled):hover{transform:translateY(-1px)}}
@media(max-width:900px){
  .wrap{padding-left:14px!important;padding-right:14px!important}
  .top{gap:14px!important}
  h1{line-height:1.35}
  .card{border-radius:15px!important}
  .modal,.dialog{max-width:calc(100vw - 24px)!important}
}
@media(max-width:640px){
  body{font-size:14px}
  .wrap{padding-top:20px!important;padding-bottom:44px!important}
  .top{align-items:flex-start!important;flex-wrap:wrap!important}
  .top>div:last-child{width:auto}
  .btn,button{min-height:42px}
  input,select,textarea{font-size:16px!important} /* avoids iOS zoom */
  .card{padding:15px!important}
  .balance{font-size:28px!important}
  .bubble{max-width:92%!important}
  .hj-toast-root{left:12px;right:12px;bottom:12px;max-width:none}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}


/* Phase 17.4 validation feedback */
.hj-required-notice{position:fixed;z-index:99999;left:50%;bottom:24px;transform:translate(-50%,18px);opacity:0;pointer-events:none;background:rgba(15,17,24,.96);border:1px solid rgba(255,74,95,.65);box-shadow:0 14px 40px rgba(0,0,0,.45);border-radius:14px;padding:12px 18px;color:#fff;font-size:14px;transition:.22s ease;max-width:min(90vw,520px);text-align:center}.hj-required-notice.show{opacity:1;transform:translate(-50%,0)}.hj-invalid{border-color:#ff4a5f!important;box-shadow:0 0 0 3px rgba(255,74,95,.12)!important}


/* Phase 17.5 — Support launcher */
.hj-support-launcher{
  position:fixed;inset-inline-end:22px;bottom:22px;z-index:9996;
  width:56px;height:56px;border-radius:50%;display:grid;place-items:center;
  color:#fff;text-decoration:none;background:
    radial-gradient(circle at 35% 30%,rgba(255,255,255,.16),transparent 26%),
    linear-gradient(145deg,rgba(19,15,31,.96),rgba(7,8,14,.98));
  border:1px solid rgba(196,148,255,.46);
  box-shadow:0 10px 35px rgba(0,0,0,.42),0 0 0 1px rgba(139,92,246,.08),0 0 24px rgba(139,92,246,.22);
  opacity:0;transform:translateY(14px) scale(.94);pointer-events:none;
  transition:opacity .3s ease,transform .3s ease,border-color .25s ease,box-shadow .25s ease;
  isolation:isolate;
}
.hj-support-launcher.hj-support-visible{opacity:1;transform:translateY(0) scale(1);pointer-events:auto}
.hj-support-launcher::before{
  content:"";position:absolute;inset:-7px;border-radius:50%;z-index:-1;
  border:1px solid rgba(196,148,255,.17);opacity:.7;
  animation:hjSupportPulse 2.8s ease-out infinite;
}
.hj-support-launcher::after{
  content:"";position:absolute;top:7px;inset-inline-end:6px;width:8px;height:8px;border-radius:50%;
  background:#d946ef;box-shadow:0 0 12px rgba(217,70,239,.8);
}
.hj-support-launcher svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;transition:transform .25s ease}
.hj-support-launcher:hover,.hj-support-launcher:focus-visible{
  border-color:rgba(217,70,239,.85);box-shadow:0 12px 38px rgba(0,0,0,.48),0 0 28px rgba(139,92,246,.38);outline:none;
}
.hj-support-launcher:hover svg,.hj-support-launcher:focus-visible svg{transform:scale(1.08) rotate(-3deg)}
.hj-support-launcher .hj-support-tip{
  position:absolute;inset-inline-end:68px;top:50%;transform:translateY(-50%) translateX(6px);
  white-space:nowrap;padding:8px 11px;border-radius:10px;background:rgba(10,8,16,.96);
  border:1px solid rgba(196,148,255,.28);font:500 11px/1.2 'Vazirmatn',Tahoma,sans-serif;color:#f7f2ff;
  box-shadow:0 8px 25px rgba(0,0,0,.35);opacity:0;pointer-events:none;transition:.22s ease;
}
.hj-support-launcher:hover .hj-support-tip,.hj-support-launcher:focus-visible .hj-support-tip{opacity:1;transform:translateY(-50%) translateX(0)}
@keyframes hjSupportPulse{0%{transform:scale(.86);opacity:.62}70%,100%{transform:scale(1.32);opacity:0}}
@media(max-width:640px){.hj-support-launcher{width:52px;height:52px;inset-inline-end:16px;bottom:16px}.hj-support-launcher .hj-support-tip{display:none}}
@media(prefers-reduced-motion:reduce){.hj-support-launcher::before{animation:none}}

.hj-home-support-cta{
  max-width:760px;margin:8px auto 48px;padding:20px 22px;display:flex;align-items:center;justify-content:space-between;gap:18px;
  color:#fff;text-decoration:none;border:1px solid rgba(196,148,255,.28);background:linear-gradient(135deg,rgba(139,92,246,.08),rgba(217,70,239,.04));
  clip-path:polygon(0 0,calc(100% - 14px) 0,100% 14px,100% 100%,14px 100%,0 calc(100% - 14px));
  transition:transform .25s ease,border-color .25s ease,background .25s ease;
}
.hj-home-support-cta:hover{transform:translateY(-3px);border-color:rgba(217,70,239,.55);background:linear-gradient(135deg,rgba(139,92,246,.14),rgba(217,70,239,.08))}
.hj-home-support-copy{display:flex;align-items:center;gap:14px;text-align:right}
.hj-home-support-icon{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;border:1px solid rgba(196,148,255,.36);box-shadow:0 0 20px rgba(139,92,246,.18)}
.hj-home-support-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.hj-home-support-copy strong{display:block;font-size:14px}.hj-home-support-copy small{display:block;color:#aaa2b6;margin-top:4px;font-size:11px}
.hj-home-support-arrow{font-size:20px;color:#c494ff}
