/* client-pro.css — Premium client design system (visual layer ONLY).
 * Loaded AFTER tokens.css + shell.css in base.html, so it enhances without
 * replacing. SAFETY CONTRACT (never break functionality):
 *  - no display / visibility / pointer-events / position changes on any
 *    functional element; decorative layers use pointer-events:none only.
 *  - no width/height/layout overrides; only paint (background, border,
 *    shadow, radius), motion (transform on :hover, animations) and focus.
 *  - all colors derive from existing var(--*) tokens so themes keep working.
 *  - prefers-reduced-motion disables every animation.
 */

/* ── 1. Ambient stage: layered aurora background on the app canvas ── */
.app{
  background-image:
    radial-gradient(1100px 480px at 85% -120px, rgba(30,146,247,.14), transparent 60%),
    radial-gradient(900px 420px at 8% 8%, rgba(64,191,127,.10), transparent 60%),
    radial-gradient(1000px 600px at 50% 115%, rgba(124,93,250,.10), transparent 62%);
  background-attachment: fixed;
}

/* ── 2. Headings: gradient ink + accent rule ── */
main h1{
  background:linear-gradient(92deg, var(--fg) 30%, var(--accent) 85%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  letter-spacing:-.02em;
}
main h1::after{
  content:""; display:block; height:3px; width:64px; border-radius:999px;
  margin-top:8px;
  background:linear-gradient(90deg, var(--accent), var(--ok), transparent);
}
.lead{ line-height:1.75; }

/* ── 3. Cards: glass lift ── */
.card{
  background:linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0) 40%), var(--panel, var(--surface-1));
  border:1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  border-radius:18px;
  box-shadow:0 18px 45px -22px rgba(2,8,20,.65), 0 2px 0 rgba(255,255,255,.03) inset;
  transition:transform .35s var(--ease, ease), box-shadow .35s var(--ease, ease), border-color .35s;
  animation:proRise .55s var(--ease, ease) backwards;
}
.card:hover{
  transform:translateY(-2px);
  border-color:color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow:0 14px 32px -18px rgba(30,146,247,.18), 0 2px 0 rgba(255,255,255,.04) inset;
}
@keyframes proRise{ from{ opacity:0; transform:translateY(14px); } to{ opacity:1; transform:none; } }

/* Search is a long, interactive form: favor predictable scrolling and cheaper
   paint over decorative motion. Scope this to /search; other pages keep the
   existing visual treatment. */
body.search-page .app{ background-attachment:scroll; }
body.search-page .topbar{
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
  background:var(--panel);
}
body.search-page main .card,
body.search-page main .search-message-card{
  animation:none;
  transition:border-color .15s ease;
  box-shadow:0 3px 12px -8px rgba(2,8,20,.45), 0 1px 0 rgba(255,255,255,.025) inset;
}
body.search-page main .card:hover,
body.search-page main .search-message-card:hover{
  transform:none;
  box-shadow:0 3px 12px -8px rgba(2,8,20,.45), 0 1px 0 rgba(255,255,255,.025) inset;
}

/* Mobile scroll performance: fixed, multi-layer backgrounds and a frosted
   sticky header can force repeated repaints while the page moves. Keep the
   same layout, colors and sticky behavior, but use a scroll-attached canvas
   and a solid header on touch-sized screens. */
@media (max-width: 767px){
  .app{background-attachment:scroll;}
  .topbar{
    -webkit-backdrop-filter:none;
    backdrop-filter:none;
    background:var(--panel);
  }
}

/* ── 4. Buttons: gradient primary + luminous hover (all states clickable) ── */
button, .btn{
  border-radius:12px;
  transition:transform .22s var(--ease, ease), box-shadow .22s, filter .22s, background .22s;
}
button:not(.ghost):not(.icon-btn):not(.btn-ghost):not(.toggle):not(.lang-opt):not(.theme-opt):not(.oauth-toggle):not(.toast-x):not(.ec-close):not(.ib-close):not(.mnav-close),
.btn.accent{
  background:linear-gradient(135deg, #2AA3FF 0%, var(--accent) 45%, #7C5DFA 130%);
  border:1px solid rgba(255,255,255,.16);
  color:#fff; font-weight:700;
  box-shadow:0 6px 14px -8px rgba(30,146,247,.28), 0 1px 0 rgba(255,255,255,.25) inset;
  text-shadow:0 1px 2px rgba(0,0,0,.25);
}
button:not(.ghost):not(.icon-btn):not(.btn-ghost):not(.toggle):not(.lang-opt):not(.theme-opt):not(.oauth-toggle):not(.toast-x):not(.ec-close):not(.ib-close):not(.mnav-close):hover:not(:disabled),
.btn.accent:hover:not(:disabled){
  transform:translateY(-2px); filter:brightness(1.04);
  box-shadow:0 8px 18px -8px rgba(30,146,247,.32), 0 0 0 2px rgba(30,146,247,.09);
}
button:not(.ghost):not(.icon-btn):not(.btn-ghost):not(.toggle):not(.lang-opt):not(.theme-opt):not(.oauth-toggle):not(.toast-x):not(.ec-close):not(.ib-close):not(.mnav-close):active:not(:disabled),
.btn.accent:active:not(:disabled){ transform:translateY(0) scale(.98); }
button.ghost:hover:not(:disabled), .btn.ghost:hover:not(:disabled), .btn-ghost:hover:not(:disabled){
  border-color:var(--accent); color:var(--fg);
  box-shadow:0 0 0 2px rgba(30,146,247,.07);
  transform:translateY(-1px);
}
button:disabled, .btn:disabled, button[aria-disabled="true"], .btn[aria-disabled="true"]{
  filter:grayscale(.45) brightness(.82); cursor:not-allowed; opacity:.7;
  box-shadow:none; transform:none; text-shadow:none;
}
button:focus-visible, .btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible{
  outline:2px solid var(--accent); outline-offset:3px;
}

/* ── 5. Sidebar nav: gliding active pill ── */
.nav-item{
  border-radius:12px; position:relative;
  transition:background .25s, transform .25s, color .25s;
}
.nav-item:hover:not([aria-disabled="true"]){ background:var(--surface-2); transform:translateX(3px); }
[dir="rtl"] .nav-item:hover{ transform:translateX(-3px); }
.nav-item.active, .nav-item[aria-current="page"]{
  background:linear-gradient(120deg, rgba(30,146,247,.22), rgba(124,93,250,.16));
  border:1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow:0 4px 12px -8px rgba(30,146,247,.3);
  font-weight:700;
}
.nav-item .ico{
  display:inline-flex; align-items:center; justify-content:center;
  width:30px; height:30px; border-radius:9px; flex:0 0 30px;
  background:rgba(255,255,255,.04); border:1px solid var(--border-soft);
}
.nav-item.active .ico{
  background:linear-gradient(135deg, var(--accent), #7C5DFA); border-color:transparent;
}
.nav-group-label{
  background:linear-gradient(90deg, var(--muted), transparent);
  -webkit-background-clip:text; background-clip:text;
  letter-spacing:.14em;
}

/* ── 6. Topbar: frosted depth ── */
.topbar{
  background:color-mix(in srgb, var(--panel) 82%, transparent);
  -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px);
  border-bottom:1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
  box-shadow:0 12px 32px -18px rgba(2,8,20,.8);
}
.icon-btn{ transition:transform .2s, box-shadow .2s, border-color .2s; }
.icon-btn:hover:not(:disabled):not([aria-disabled="true"]){ transform:translateY(-1px) scale(1.05); border-color:var(--accent); box-shadow:0 0 0 2px rgba(30,146,247,.08); }
.pswitch-avatar, .prof-avatar{
  background:linear-gradient(135deg, var(--accent), #7C5DFA) !important;
  color:#fff !important; font-weight:800;
  box-shadow:0 4px 12px -6px rgba(30,146,247,.35);
  border:1px solid rgba(255,255,255,.25);
}

/* ── 7. Inputs: luminous focus ── */
input:not([type="checkbox"]):not([type="radio"]), select, textarea{
  border-radius:12px;
  transition:border-color .25s, box-shadow .25s, background .25s;
}
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(30,146,247,.20), 0 8px 24px -12px rgba(30,146,247,.5);
  background:color-mix(in srgb, var(--surface-2) 70%, transparent);
}
input:not([type="checkbox"]):not([type="radio"]):disabled, select:disabled, textarea:disabled{
  cursor:not-allowed; opacity:.7; filter:grayscale(.25); box-shadow:none;
}

/* ── 8. Job / app / mail cards: gallery lift ── */
.job-card, .ec-card, .ib-card{
  border-radius:16px;
  background:linear-gradient(180deg, rgba(255,255,255,.022), rgba(255,255,255,0) 45%), var(--surface-1);
  transition:transform .3s var(--ease, ease), box-shadow .3s, border-color .3s;
  animation:proRise .5s var(--ease, ease) backwards;
}
.job-card:hover, .ec-card:hover, .ib-card:hover{
  transform:translateY(-3px);
  box-shadow:0 12px 26px -14px rgba(30,146,247,.2);
}
.ec-card.sel, .ib-card.sel{
  border-color:var(--accent);
  box-shadow:0 0 0 2px rgba(30,146,247,.45), 0 10px 24px -14px rgba(30,146,247,.25);
}

/* ── 9. Status pills + badges: glossy ── */
.status, .ms-badge, .adm-badge, .badge-interview, .tag, .kind-badge, .src-badge{
  box-shadow:0 2px 8px -3px rgba(0,0,0,.5), 0 1px 0 rgba(255,255,255,.12) inset;
  letter-spacing:.02em;
}
.badge-interview{ animation:pulseGlow 2.4s ease-in-out infinite; }

/* ── 10. Filter chips: segmented glow ── */
.ec-filter, .ib-filter{
  border-radius:10px; transition:background .25s, transform .25s, box-shadow .25s;
}
.ec-filter:hover, .ib-filter:hover{ transform:translateX(2px); }
[dir="rtl"] .ec-filter:hover, [dir="rtl"] .ib-filter:hover{ transform:translateX(-2px); }
.ec-filter.active, .ib-filter.active{
  background:linear-gradient(120deg, rgba(30,146,247,.28), rgba(124,93,250,.20));
  box-shadow:0 3px 10px -6px rgba(30,146,247,.3);
}
.ec-filter .cnt, .ib-filter .cnt{ transition:background .25s, transform .25s; }
.ec-filter.active .cnt, .ib-filter.active .cnt{ transform:scale(1.04); }

/* ── 11. Tables: sheen header + row hover ── */
table thead th{
  background:linear-gradient(180deg, rgba(30,146,247,.16), rgba(30,146,247,.05));
  letter-spacing:.04em;
}
table tbody tr{ transition:background .2s; }
table tbody tr:hover{ background:rgba(30,146,247,.07); }

/* ── 12. Tabs: sliding underline ── */
.tabs a{ position:relative; transition:color .25s; }
.tabs a::after{
  content:""; position:absolute; inset-inline:10px; bottom:-1px; height:3px; border-radius:999px;
  background:linear-gradient(90deg, var(--accent), #7C5DFA);
  transform:scaleX(0); transition:transform .3s var(--ease, ease);
}
.tabs a:hover::after{ transform:scaleX(.6); }
.tabs a.active{ color:var(--fg); font-weight:700; }
.tabs a.active::after{ transform:scaleX(1); }

/* ── 13. Drawers: cinematic depth ── */
.ec-drawer, .ib-drawer{
  box-shadow:-40px 0 80px -20px rgba(0,0,0,.6);
  border-inline-start:1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
}

/* ── 14. Toasts + empty states ── */
.toast, .fb{
  border-radius:14px; -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
  box-shadow:0 10px 24px -12px rgba(0,0,0,.6);
  animation:toastPop .35s cubic-bezier(.2,1.4,.4,1) both;
}
@keyframes toastPop{ from{ opacity:0; transform:translateY(12px) scale(.96); } to{ opacity:1; transform:none; } }
.empty-state .empty-icon{ filter:drop-shadow(0 5px 10px rgba(30,146,247,.18)); animation:floatY 4s ease-in-out infinite; }
@keyframes floatY{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-8px); } }

/* ── 15. Progress + meters: gradient fill ── */
.up-prog, .bulk-prog, .pw-meter{ border-radius:999px; overflow:hidden; }
.up-prog > span, .bulk-prog > span{
  background:linear-gradient(90deg, var(--accent), #7C5DFA, var(--ok));
  background-size:200% 100%; animation:barSlide 2.2s linear infinite;
}
@keyframes barSlide{ to{ background-position:-200% 0; } }

/* ── 16. Mode + gate bars: hero treatment ── */
#mode-card{ border-width:1.5px; }
#gate-bar{
  background:linear-gradient(120deg, color-mix(in srgb, var(--panel) 88%, transparent), rgba(30,146,247,.10));
  box-shadow:0 20px 50px -18px rgba(30,146,247,.45);
  -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px);
}
#gate-start{
  background:linear-gradient(135deg, #2ECC71 0%, #27AE60 55%, #1E92F7 140%);
  box-shadow:0 6px 16px -8px rgba(46,204,113,.3);
  animation:gateGlow 2.8s ease-in-out infinite;
}
@keyframes gateGlow{ 0%,100%{ box-shadow:0 6px 16px -8px rgba(46,204,113,.3); } 50%{ box-shadow:0 6px 20px -6px rgba(46,204,113,.4), 0 0 0 2px rgba(46,204,113,.08); } }

/* ── 17. Links + scrollbars + selection ── */
main a:not(.btn):not(.nav-item){ transition:color .2s, text-shadow .2s; }
main a:not(.btn):not(.nav-item):hover{ color:var(--accent); text-shadow:0 0 10px rgba(30,146,247,.22); }
::selection{ background:rgba(30,146,247,.4); }
/* NOTE (owner request): no custom scrollbar — native browser scrollbars. */
*{ scrollbar-width:auto; }
/* ── Scrollbars: vertical follows the active theme; horizontal is banned ──
   (owner request: no sideways movement anywhere — vertical thumb uses the
   theme accent so it always matches blue/navy/arctic). */
html, body { overflow-x:clip; }
::-webkit-scrollbar { width:10px; height:0; }
::-webkit-scrollbar:horizontal { display:none; }
::-webkit-scrollbar-thumb:vertical {
  background:linear-gradient(180deg, var(--accent, #1E92F7), var(--accent-2, #1D62A1));
  border-radius:999px; border:2px solid transparent; background-clip:content-box; }
::-webkit-scrollbar-track { background:transparent; }

/* ── 18. Auth card: spotlight ── */
.card.signin{
  background:linear-gradient(180deg, rgba(30,146,247,.08), rgba(255,255,255,0) 35%), var(--panel, var(--surface-1));
  box-shadow:0 30px 80px -30px rgba(30,146,247,.45);
}

/* ── 20. Brand logo: transparent artwork, no box, theme-safe ── */
.topbar .brand .logo, img.je-logo{
  background:transparent !important;
  border-radius:0 !important;
  box-shadow:none !important;
  filter:drop-shadow(0 4px 12px rgba(30,146,247,.25));
}

/* ── 21. Sniper strike on live counters (dashboard/billing; see counter-strike.js).
   Generic .strike-fx set + legacy .jobs-num set share identical rules. ── */
.strike-fx{ position:relative; }
.strike-fx .last-d, .jobs-num .last-d{ position:relative; display:inline-block; }
.strike-fx .lock-ring, .jobs-num .lock-ring{ position:absolute; inset:-8px -10px; border-radius:50%;
  border:2.5px solid var(--ok, #3FBF7F); pointer-events:none;
  box-shadow:0 0 12px rgba(63,191,127,.9), 0 0 26px rgba(63,191,127,.45), inset 0 0 10px rgba(63,191,127,.35);
  animation:lockPulse 1s ease-in-out infinite; }
.strike-fx .lock-ring::before, .jobs-num .lock-ring::before{ content:""; position:absolute; left:50%; top:-16px; bottom:-16px; width:2px;
  transform:translateX(-50%);
  background:linear-gradient(180deg, transparent, var(--ok, #3FBF7F) 30%, var(--ok, #3FBF7F) 70%, transparent);
  box-shadow:0 0 8px rgba(63,191,127,.9); }
.strike-fx .lock-ring::after, .jobs-num .lock-ring::after{ content:""; position:absolute; top:50%; left:-16px; right:-16px; height:2px;
  transform:translateY(-50%);
  background:linear-gradient(90deg, transparent, var(--ok, #3FBF7F) 30%, var(--ok, #3FBF7F) 70%, transparent);
  box-shadow:0 0 8px rgba(63,191,127,.9); }
.strike-fx .lock-outer, .jobs-num .lock-outer{ position:absolute; inset:-16px -19px; border-radius:50%; pointer-events:none;
  border:2px dashed rgba(63,191,127,.85); box-shadow:0 0 16px rgba(63,191,127,.4);
  animation:scopeSpin 3s linear infinite; }
@keyframes scopeSpin{ to{ transform:rotate(360deg); } }
@keyframes lockPulse{ 0%,100%{ transform:scale(1); opacity:1; } 50%{ transform:scale(1.1); opacity:.8; } }
.strike-fx .rocket-fx, .jobs-num .rocket-fx{ position:absolute; z-index:3; font-size:34px; line-height:1; pointer-events:none;
  filter:hue-rotate(95deg) saturate(1.7) drop-shadow(0 0 10px rgba(63,191,127,1)) drop-shadow(0 0 30px rgba(63,191,127,.6));
  text-shadow:-8px 8px 12px rgba(63,191,127,.55), -16px 16px 18px rgba(63,191,127,.3);
  animation:rocketFly .85s cubic-bezier(.3,.7,.4,1) both; }
@keyframes rocketFly{
  0%{ transform:translate(var(--rx), var(--ry)) rotate(-38deg) scale(.75); opacity:0; }
  15%{ opacity:1; }
  85%{ transform:translate(0,0) rotate(-38deg) scale(1.15); opacity:1; }
  100%{ transform:translate(0,0) rotate(-38deg) scale(1.3); opacity:0; } }
.strike-fx .hit-flash, .jobs-num .hit-flash{ position:absolute; z-index:4; width:78px; height:78px; border-radius:50%; pointer-events:none;
  background:radial-gradient(circle, rgba(255,255,255,.95) 0%, rgba(63,191,127,.9) 35%, rgba(63,191,127,0) 70%);
  animation:hitFlash .5s ease-out both; }
.strike-fx .hit-wave, .jobs-num .hit-wave{ position:absolute; z-index:4; width:78px; height:78px; border-radius:50%; pointer-events:none;
  border:3px solid rgba(63,191,127,.9); box-shadow:0 0 18px rgba(63,191,127,.7);
  animation:hitWave .6s ease-out both; }
@keyframes hitFlash{ 0%{ transform:scale(.3); opacity:1; } 100%{ transform:scale(1.5); opacity:0; } }
@keyframes hitWave{ 0%{ transform:scale(.4); opacity:1; } 100%{ transform:scale(1.9); opacity:0; } }
@media (prefers-reduced-motion: reduce){
  .strike-fx .lock-ring, .strike-fx .lock-outer, .strike-fx .rocket-fx,
  .strike-fx .hit-flash, .strike-fx .hit-wave,
  .jobs-num .lock-ring, .jobs-num .lock-outer, .jobs-num .rocket-fx,
  .jobs-num .hit-flash, .jobs-num .hit-wave{ animation:none !important; display:none !important; }
}

/* ── 21. Trust strip (same look as payment pages, usable anywhere) ── */
.paym-trust{ position:relative; overflow:hidden;
  border:1px solid rgba(63,191,127,.55); border-radius:14px;
  padding:14px 18px; margin-bottom:14px;
  background:linear-gradient(135deg, rgba(63,191,127,.14), rgba(63,191,127,.05));
  box-shadow:0 0 12px rgba(63,191,127,.09);
  animation:trustGlow 3s ease-in-out infinite; }
.paym-trust::after{ content:""; position:absolute; top:0; bottom:0; width:70px; left:-90px;
  background:linear-gradient(100deg, transparent, rgba(255,255,255,.22), transparent);
  animation:trustShine 3.4s ease-in-out infinite; pointer-events:none; }
.paym-trust ul{ margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:6px; }
.paym-trust li{ font-size:13.5px; line-height:1.65; }
.paym-trust li.bye{ font-weight:800; color:var(--ok); }
@keyframes trustGlow{ 0%,100%{ box-shadow:0 0 9px rgba(63,191,127,.08); } 50%{ box-shadow:0 0 17px rgba(63,191,127,.19); } }
@keyframes trustShine{ 0%{ left:-90px; } 60%,100%{ left:110%; } }

/* ── 21. Reduced motion: static elegance ── */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{ animation:none !important; transition:none !important; }
}
