/* JH-022 Unified Premium Visual Experience — presentation only.
   Professional First — Mascot Second. Tokens align with owner-approved boards.
   Logical CSS properties keep RTL/LTR layout mirrored without flipping mascot art. */
:root,
body[data-stitch],
body.jobshub-pilot{
  --jh-navy:#0B1F44;
  --jh-navy-deep:#102B4C;
  --jh-royal:#1565E6;
  --jh-royal-deep:#0D397D;
  --jh-gold:#F7B500;
  --jh-gold-soft:#EBB64E;
  --jh-ice:#EAF1FC;
  --jh-ice-soft:#E6F2FF;
  --jh-offwhite:#F7F9FC;
  --jh-surface:#FFFFFF;
  --jh-ink:#0F1E36;
  --jh-muted:#4B5B73;
  --jh-line:#D6E0F0;
  --jh-ok:#16834A;
  --jh-warn:#B36B00;
  --jh-danger:#B42318;
  --jh-radius-card:14px;
  --jh-radius-control:12px;
  --jh-shadow:0 8px 24px rgba(11,31,68,.07);
}

/* Shared authenticated canvas — subtle blue/gold atmosphere, never toy-like. */
body[data-stitch=candidate][data-approved-member=true],
body[data-stitch=admin],
body.jobshub-pilot[data-approved-member=true]{
  background:
    radial-gradient(ellipse at 0% 0%,rgba(21,101,230,.08),transparent 42%),
    radial-gradient(ellipse at 100% 100%,rgba(247,181,0,.07),transparent 38%),
    linear-gradient(180deg,var(--jh-offwhite),var(--jh-ice-soft) 55%,var(--jh-offwhite))!important;
  color:var(--jh-ink);
}
body[data-stitch] .sf-stage::before{
  content:"";
  position:fixed;
  inset:auto 0 0 0;
  block-size:120px;
  pointer-events:none;
  z-index:0;
  opacity:.35;
  background:
    linear-gradient(180deg,transparent,rgba(234,241,252,.9)),
    radial-gradient(ellipse at 18% 100%,rgba(13,57,125,.12),transparent 42%),
    radial-gradient(ellipse at 82% 100%,rgba(235,182,78,.14),transparent 40%);
}
body[data-stitch] .sf-stage > *{position:relative;z-index:1}

/* Premium cards / forms / tables / tabs */
body[data-stitch] :is(.panel,.sf-card,.jh-card,table,.sf-record-group){
  border-color:var(--jh-line)!important;
  border-radius:var(--jh-radius-card)!important;
  box-shadow:var(--jh-shadow);
  background:var(--jh-surface);
}
body[data-stitch] :is(button.btn,a.btn,.btn){
  border-radius:var(--jh-radius-control)!important;
  min-block-size:44px;
  font-weight:600;
  letter-spacing:.01em;
}
body[data-stitch] :is(button.btn:not(.secondary),a.btn:not(.secondary),.btn:not(.secondary)){
  background:linear-gradient(180deg,var(--jh-royal),var(--jh-royal-deep))!important;
  border-color:var(--jh-royal-deep)!important;
  color:#fff!important;
}
body[data-stitch] :is(button.btn.secondary,a.btn.secondary,.btn.secondary){
  background:#fff!important;
  border:1px solid var(--jh-line)!important;
  color:var(--jh-royal-deep)!important;
}
body[data-stitch] :is(input,select,textarea){
  border-radius:10px!important;
  border-color:var(--jh-line)!important;
  background:#fff!important;
  min-block-size:44px;
}
body[data-stitch] :is(input,select,textarea):focus-visible,
body[data-stitch] :is(button,a.btn,[role=tab],summary):focus-visible{
  outline:2px solid var(--jh-royal)!important;
  outline-offset:2px;
}
body[data-stitch] [role=tablist] [role=tab]{
  border-radius:999px;
  padding-inline:14px;
  min-block-size:40px;
  white-space:nowrap;
}
body[data-stitch] [role=tab][aria-selected=true]{
  background:var(--jh-ice)!important;
  color:var(--jh-royal-deep)!important;
  border-color:#b7c9e8!important;
}
body[data-stitch] table{width:100%;border-collapse:separate;border-spacing:0}
body[data-stitch] :is(th,td){padding:12px 14px;border-bottom:1px solid var(--jh-line);vertical-align:middle}
body[data-stitch] th{background:var(--jh-ice);color:var(--jh-navy);font-weight:700;text-align:start}

/* Status / empty / success / warning / error — truthful presentation only */
.jh-state{
  display:flex;align-items:center;gap:14px;padding:16px 18px;border-radius:14px;
  border:1px solid var(--jh-line);background:#fff;box-shadow:var(--jh-shadow);max-inline-size:720px;
}
.jh-state__mascot{inline-size:72px;block-size:auto;flex:none}
.jh-state__title{margin:0;font-weight:700;color:var(--jh-royal-deep)}
.jh-state__detail{margin:4px 0 0;color:var(--jh-muted);overflow-wrap:anywhere}
.jh-state--success{border-color:#b7e0c5;background:#f3fbf6}
.jh-state--warning{border-color:#f0d39a;background:#fff9ec}
.jh-state--error{border-color:#f1c0bb;background:#fff5f4}
.jh-state--empty{background:linear-gradient(180deg,#fff,var(--jh-ice))}

/* Login enrichment — door/human artwork untouched; decorative surrounds + secondary mascot */
body.jobshub-pilot:not([data-approved-member=true]) .jh-onboarding{
  position:relative;
}
body.jobshub-pilot:not([data-approved-member=true]) .jh-onboarding::before,
body.jobshub-pilot:not([data-approved-member=true]) .jh-onboarding::after{
  content:"";
  position:absolute;
  pointer-events:none;
  z-index:0;
  border-radius:50%;
  filter:blur(2px);
}
body.jobshub-pilot:not([data-approved-member=true]) .jh-onboarding::before{
  inset-inline-start:-40px;inset-block-start:8%;
  inline-size:180px;block-size:180px;
  background:radial-gradient(circle,rgba(21,101,230,.18),transparent 70%);
}
body.jobshub-pilot:not([data-approved-member=true]) .jh-onboarding::after{
  inset-inline-end:-30px;inset-block-end:4%;
  inline-size:220px;block-size:220px;
  background:radial-gradient(circle,rgba(247,181,0,.16),transparent 68%);
}
body.jobshub-pilot:not([data-approved-member=true]) .jh-approved-login-poster,
body.jobshub-pilot:not([data-approved-member=true]) .jh-signin-column{
  position:relative;z-index:1;
}
.jh-login-mascot-support{
  /* Secondary, in-flow at the end of the sign-in panel: cannot overlap the hero, benefit pills or form controls. */
  position:static;
  display:flex;
  justify-content:flex-end;
  margin-block-start:14px;
  pointer-events:none;
}
.jh-login-mascot-support img{
  inline-size:88px;
  block-size:auto;
  display:block;
  filter:drop-shadow(0 8px 16px rgba(11,31,68,.18));
}
@media (max-width:720px){
  .jh-login-mascot-support{margin-block-start:8px}
  .jh-login-mascot-support img{inline-size:60px;opacity:.95}
}

 /* Coming Soon capsule (approved navy/gold, text only). Signed-in phones: the header controls fill the row, so the
   capsule leaves absolute positioning and takes its own centred row in the wrapping header instead of covering the
   language, notification and help controls (PR #79 remediation, measured 360-600px EN/AR/FR/ES).
   The workspace-route top bar (.sf-topbar: crumb, account/help tools, interface language, status) has no free centre
   either — the absolute capsule covered Help & support at 1440px — so it gets the same treatment at every width. */
html body.jobshub-pilot[data-approved-member="true"]:not([data-route="candidate-dashboard"]) .jh-product-header.sf-topbar{flex-wrap:wrap!important;height:auto!important;min-height:0!important}
html body.jobshub-pilot[data-approved-member="true"]:not([data-route="candidate-dashboard"]) .jh-product-header.sf-topbar .jh-coming-soon,
html[dir=rtl] body.jobshub-pilot[data-approved-member="true"]:not([data-route="candidate-dashboard"]) .jh-product-header.sf-topbar .jh-coming-soon{
  position:relative!important;inset:auto!important;transform:none!important;order:99;
  flex:0 0 auto;width:min(226px,80vw)!important;height:32px!important;line-height:30px!important;
  margin-block:6px 2px;margin-inline:max(0px,calc((100% - min(226px,80vw)) / 2));
}
@media (max-width:600px){
  html body.jobshub-pilot[data-approved-member="true"] .jh-product-header{flex-wrap:wrap!important;height:auto!important;min-height:0!important}
  html body.jobshub-pilot[data-approved-member="true"] .jh-product-header .jh-coming-soon,
  html[dir=rtl] body.jobshub-pilot[data-approved-member="true"] .jh-product-header .jh-coming-soon{
    position:relative!important;inset:auto!important;transform:none!important;order:99;
    flex:0 0 auto;width:min(226px,80vw)!important;height:32px!important;line-height:30px!important;
    margin-block:6px 2px;margin-inline:max(0px,calc((100% - min(226px,80vw)) / 2));
  }
}

/* Sidebar mascot — unobtrusive professional presence */
.sf-nav .jh-nav-mascot,
.jh-primary-nav .jh-nav-mascot{
  margin-block-start:auto;
  padding:12px 8px 4px;
  display:grid;
  justify-items:center;
  gap:6px;
  pointer-events:none;
}
.sf-nav .jh-nav-mascot img,
.jh-primary-nav .jh-nav-mascot img{
  inline-size:88px;block-size:auto;max-inline-size:100%;
}
.sf-nav .jh-nav-mascot small,
.jh-primary-nav .jh-nav-mascot small{
  color:#c5d2e6;font-size:10px;letter-spacing:.04em;text-align:center;
}

/* Admin visual alignment */
body[data-stitch=admin] .sf-nav,
body[data-approved-admin=true] .shell > nav,
body[data-approved-admin=true] .ux-admin-nav{
  background:linear-gradient(160deg,#0B1F44,#16345f)!important;
}
body[data-approved-admin=true] .ux-admin-priority,
body[data-stitch=admin] .sf-card{
  border-radius:var(--jh-radius-card);
  border:1px solid var(--jh-line);
  box-shadow:var(--jh-shadow);
}
body[data-stitch=admin] .sf-nav [aria-current=page],
body[data-approved-admin=true] .ux-admin-nav a[aria-current=page]{
  border-color:var(--jh-gold-soft)!important;
  color:#f5e3b0!important;
  background:rgba(235,182,78,.16)!important;
}

/* Mobile web — purpose-designed denser composition */
@media (max-width:720px){
  body[data-stitch=candidate][data-approved-member=true]{
    background:linear-gradient(180deg,#F7F9FC,#EAF1FC 40%,#F7F9FC)!important;
  }
  body[data-stitch] .sf-page-body{grid-template-columns:1fr!important}
  body[data-stitch] .panel,
  body[data-stitch] .sf-card{padding:12px!important}
  body[data-stitch] .sf-screen-head h1{font-size:22px}
  body[data-stitch] [role=tab]{max-inline-size:100%;overflow-wrap:anywhere;white-space:normal}
  .jh-nav-mascot{display:none!important}
}

/* Multilingual: avoid clipping; allow flexible control widths */
body[data-stitch] :is(button,a.btn,[role=tab],.jh-simple-primary span:last-child){
  overflow-wrap:anywhere;
  hyphens:manual;
}
html[lang=fr] body[data-stitch] .jh-simple-primary,
html[lang=es] body[data-stitch] .jh-simple-primary{
  font-size:12.5px;
}
html[dir=rtl] .jh-loader__mascot,
html[dir=rtl] .jh-state__mascot,
html[dir=rtl] .jh-nav-mascot img,
html[dir=rtl] .jh-login-mascot-support img{
  transform:none!important; /* keep JobsHub.cv wordmark readable */
}

@media (prefers-reduced-motion:reduce){
  .jh-login-mascot-support img,
  .jh-nav-mascot img{animation:none!important}
}
