/* Beyond Care v139 — exact build of the approved login mockup.
   On desktop the sign-in screen is a fixed-ratio stage painted with the approved
   artwork (assets/login/v139/login-stage.webp). The real logo link, inputs, language
   menu and buttons sit on top of their drawn counterparts, so the design matches
   the mockup while auth handlers, IDs, keyboard access and screen-reader text stay
   intact. The stage scales to fit the window (cropping at most a sliver of the
   decorative side edges) and paper texture fills any spare space.
   Applies only while the login panel is showing; the password-setup panel and
   screens below 1180px keep the v108 layout. */
@media (min-width:1180px) and (min-height:560px){
  body #authOverlay:has(#loginPanel:not([style*="none"])){
    container-type:size;
    --u:min(100cqh/941,100cqw*1.12/1672);
    --ox:calc((100cqw - 1672*var(--u))/2);
    --oy:calc((100cqh - 941*var(--u))/2);
    padding:0!important;
    overflow:hidden!important;
    background:#e6d8c4 var(--bc63-paper-texture,none) center/1536px auto repeat!important;
  }
  body #authOverlay:has(#loginPanel:not([style*="none"]))::before{content:""!important;display:block!important;position:absolute!important;left:var(--ox)!important;top:var(--oy)!important;right:auto!important;bottom:auto!important;width:calc(1672*var(--u))!important;height:calc(941*var(--u))!important;margin:0!important;transform:none!important;opacity:1!important;filter:none!important;border-radius:0!important;background:url('./assets/login/v139/login-stage.webp') 0 0/100% 100% no-repeat!important;box-shadow:0 0 calc(40*var(--u)) rgba(80,60,35,.18)!important;pointer-events:none!important;z-index:0!important}
  body #authOverlay:has(#loginPanel:not([style*="none"]))::after,body #authOverlay:has(#loginPanel:not([style*="none"])) :is(.bc104-auth-story,.bc104-auth-side) *::before,body #authOverlay:has(#loginPanel:not([style*="none"])) :is(.bc104-auth-story,.bc104-auth-side) *::after{content:none!important;display:none!important}
  body #authOverlay:has(#loginPanel:not([style*="none"])) :where(.bc104-auth-story,.bc104-auth-side,.bc104-auth-story-copy,.bc104-auth-story-grid,.bc104-auth-story-grid>div,.auth-card,#loginPanel,.form-field,.auth-actions){position:static!important;display:block!important;width:auto!important;height:auto!important;min-width:0!important;max-width:none!important;min-height:0!important;margin:0!important;padding:0!important;background:none!important;border:0!important;box-shadow:none!important;filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;transform:none!important;contain:none!important;animation:none!important;overflow:visible!important}
  body #authOverlay:has(#loginPanel:not([style*="none"])) :is(.bc104-auth-handnote,.bc104-auth-landscape,.bc104-auth-sprig,.bc104-title-stroke,.bc104-auth-divider,.auth-logo,.language-globe,.bc63-auth-wordmark,.bc63-auth-kicker,.bc63-auth-note,.bc63-auth-quote){display:none!important}
  body #authOverlay:has(#loginPanel:not([style*="none"])) .backend-note{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

  /* every placed element: absolute box in mockup pixels */
  body #authOverlay:has(#loginPanel:not([style*="none"])) :where(.bc104-auth-brand,.bc104-auth-kicker,.bc104-auth-story h2,.bc104-auth-story p,.auth-language,#loginPanel h1,#loginPanel .auth-subtitle,#loginPanel label,#loginPanel input,.auth-link,#loginBtn,.auth-note,#authError){position:absolute!important;left:calc(var(--ox) + var(--x)*var(--u))!important;top:calc(var(--oy) + var(--y)*var(--u))!important;width:calc(var(--w)*var(--u))!important;height:calc(var(--h)*var(--u))!important;min-width:0!important;min-height:0!important;max-width:none!important;margin:0!important;padding:0!important;background:transparent!important;border:0!important;border-radius:calc(4*var(--u))!important;box-shadow:none!important;filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;transform:none!important;font-size:calc(14*var(--u))!important;line-height:1.2!important;letter-spacing:0!important;text-transform:none!important;text-decoration:none!important;white-space:normal!important;z-index:2!important}
  /* drawn text: real text is kept for selection, search and assistive tech but painted transparent */
  body #authOverlay:has(#loginPanel:not([style*="none"])) :where(.bc104-auth-brand,.bc104-auth-kicker,.bc104-auth-story h2,.bc104-auth-story p,#loginPanel h1,#loginPanel .auth-subtitle,#loginPanel label,.auth-link,#loginBtn,.auth-note){overflow:hidden!important;color:transparent!important;-webkit-text-fill-color:transparent!important}
  body #authOverlay:has(#loginPanel:not([style*="none"])) :where(.bc104-auth-brand,.bc104-auth-kicker,.bc104-auth-story h2,.bc104-auth-story p,#loginPanel h1,#loginPanel .auth-subtitle,.auth-note) *{color:transparent!important;-webkit-text-fill-color:transparent!important;font-size:inherit!important;background:none!important}
  body #authOverlay:has(#loginPanel:not([style*="none"])) :is(.bc104-auth-story,#loginPanel) ::selection{color:transparent;background:rgba(215,24,31,.18)}

  body #authOverlay:has(#loginPanel:not([style*="none"])) .bc104-auth-brand{--x:112;--y:14;--w:166;--h:48}
  body #authOverlay:has(#loginPanel:not([style*="none"])) .bc104-auth-kicker{--x:122;--y:112;--w:488;--h:36}
  body #authOverlay:has(#loginPanel:not([style*="none"])) .bc104-auth-story h2{--x:122;--y:170;--w:434;--h:280}
  body #authOverlay:has(#loginPanel:not([style*="none"])) .bc104-auth-story p{--x:122;--y:460;--w:498;--h:58}
  body #authOverlay:has(#loginPanel:not([style*="none"])) .auth-language{--x:1397;--y:112;--w:142;--h:43;cursor:pointer;border-radius:999px!important}
  body #authOverlay:has(#loginPanel:not([style*="none"])) #loginPanel h1{--x:1038;--y:162;--w:322;--h:122}
  body #authOverlay:has(#loginPanel:not([style*="none"])) #loginPanel .auth-subtitle{--x:1038;--y:298;--w:438;--h:52}
  body #authOverlay:has(#loginPanel:not([style*="none"])) #loginPanel label[for="loginEmail"]{--x:1038;--y:366;--w:110;--h:24}
  body #authOverlay:has(#loginPanel:not([style*="none"])) #loginPanel label[for="loginPassword"]{--x:1038;--y:467;--w:78;--h:24}
  body #authOverlay:has(#loginPanel:not([style*="none"])) #loginEmail{--x:1041;--y:395;--w:498;--h:55}
  body #authOverlay:has(#loginPanel:not([style*="none"])) #loginPassword{--x:1041;--y:496;--w:498;--h:55}
  body #authOverlay:has(#loginPanel:not([style*="none"])) .auth-link{--x:1420;--y:561;--w:121;--h:28;cursor:pointer}
  body #authOverlay:has(#loginPanel:not([style*="none"])) #loginBtn{--x:1041;--y:607;--w:498;--h:55;cursor:pointer;border-radius:calc(5*var(--u))!important}
  body #authOverlay:has(#loginPanel:not([style*="none"])) .auth-note{--x:1038;--y:710;--w:364;--h:88}
  body #authOverlay:has(#loginPanel:not([style*="none"])) #authError{--x:1040;--y:110;--w:345;--h:auto;height:auto!important;max-height:calc(52*var(--u));overflow:auto!important;padding:calc(5*var(--u)) calc(10*var(--u))!important;background:#fbf6ee!important;border-left:calc(3*var(--u)) solid #d7181f!important;border-radius:calc(4*var(--u))!important;box-shadow:0 calc(4*var(--u)) calc(12*var(--u)) rgba(60,40,20,.12)!important;color:#a3140f!important;font:500 calc(12*var(--u))/1.35 Inter,system-ui,sans-serif!important}
  body #authOverlay:has(#loginPanel:not([style*="none"])) #authError:empty{display:none!important}

  /* links inside the note sit on their drawn red words */
  body #authOverlay:has(#loginPanel:not([style*="none"])) .auth-note a{position:absolute!important;display:block!important;left:calc(var(--lx)*var(--u));top:calc(var(--ly)*var(--u));width:calc(var(--lw)*var(--u));height:calc(18*var(--u));overflow:hidden;cursor:pointer;border-radius:calc(2*var(--u))}
  body #authOverlay:has(#loginPanel:not([style*="none"])) .auth-note a:nth-of-type(1){--lx:152;--ly:4;--lw:208}
  body #authOverlay:has(#loginPanel:not([style*="none"])) .auth-note a:nth-of-type(2){--lx:17;--ly:25;--lw:174}

  /* live controls: real typing, focus and language text */
  body #authOverlay:has(#loginPanel:not([style*="none"])) #loginPanel input{padding:0 calc(16*var(--u))!important;color:#2b2622!important;-webkit-text-fill-color:#2b2622!important;caret-color:#d7181f;font:400 calc(14*var(--u))/1 Georgia,'Times New Roman',serif!important;border-radius:calc(6*var(--u))!important;outline:none!important;transition:box-shadow .16s ease}
  body #authOverlay:has(#loginPanel:not([style*="none"])) #loginPanel input::placeholder{color:rgba(43,38,34,.42)!important;-webkit-text-fill-color:rgba(43,38,34,.42)!important;opacity:1}
  body #authOverlay:has(#loginPanel:not([style*="none"])) #loginPanel input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #f6f0e6 inset!important;-webkit-text-fill-color:#2b2622!important}
  body #authOverlay:has(#loginPanel:not([style*="none"])) #loginPanel input:hover{box-shadow:0 0 0 1px rgba(60,45,30,.18)!important}
  body #authOverlay:has(#loginPanel:not([style*="none"])) #loginPanel input:focus{box-shadow:0 0 0 2px rgba(215,24,31,.55),0 0 0 6px rgba(215,24,31,.1)!important}
  body #authOverlay:has(#loginPanel:not([style*="none"])) #loginPanel input:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 1000px #f6f0e6 inset,0 0 0 2px rgba(215,24,31,.55)!important}
  /* the platform's language picker: drawn globe and chevron show through, the live name sits between them */
  body #authOverlay:has(#loginPanel:not([style*="none"])) .auth-language .bc-language-trigger{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;margin:0!important;padding:0 0 0 calc(48*var(--u))!important;display:flex!important;align-items:center!important;background:transparent!important;border:0!important;border-radius:999px!important;box-shadow:none!important;color:#1d1a17!important;font:400 calc(15*var(--u))/1 Inter,system-ui,sans-serif!important;letter-spacing:0!important;cursor:pointer!important}
  body #authOverlay:has(#loginPanel:not([style*="none"])) .auth-language :is(.bc-language-orb,.bc-language-chevron){display:none!important}
  body #authOverlay:has(#loginPanel:not([style*="none"])) .auth-language .bc-language-name{max-width:calc(62*var(--u))!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  body #authOverlay:has(#loginPanel:not([style*="none"])) .auth-language .bc-language-trigger:focus-visible{outline:2px solid #d7181f!important;outline-offset:2px!important}
  body #authOverlay:has(#loginPanel:not([style*="none"])) .auth-language .bc-language-menu{top:calc(100% + 8px)}
  body #authOverlay:has(#loginPanel:not([style*="none"])) .auth-language:hover{background:rgba(215,24,31,.05)!important}
  body #authOverlay:has(#loginPanel:not([style*="none"])) :where(.bc104-auth-brand,.auth-link,#loginBtn,.auth-note a):focus-visible{outline:2px solid #d7181f!important;outline-offset:3px!important}
  body #authOverlay:has(#loginPanel:not([style*="none"])) .auth-link:hover{background:rgba(215,24,31,.06)!important}
  body #authOverlay:has(#loginPanel:not([style*="none"])) .auth-note a:hover{background:linear-gradient(#d7181f,#d7181f) left bottom/100% 1px no-repeat}
  body #authOverlay:has(#loginPanel:not([style*="none"])) #loginBtn:hover:not(:disabled){background:rgba(255,255,255,.1)!important;box-shadow:0 calc(5*var(--u)) calc(14*var(--u)) rgba(150,20,15,.28)!important}
  body #authOverlay:has(#loginPanel:not([style*="none"])) #loginBtn:active:not(:disabled){background:rgba(0,0,0,.08)!important}
  /* while signing in, the drawn label is covered by a live "Please wait…" button */
  body #authOverlay:has(#loginPanel:not([style*="none"])) #loginBtn:disabled{display:flex!important;align-items:center;justify-content:center;gap:calc(8*var(--u));background:#dd2a1f!important;color:#fff!important;-webkit-text-fill-color:#fff!important;font:500 calc(17*var(--u))/1 Georgia,serif!important;cursor:progress;opacity:1!important}
  body #authOverlay:has(#loginPanel:not([style*="none"])) #loginBtn:disabled .spinner{width:calc(16*var(--u));height:calc(16*var(--u))}
}
