/* ============================================================
   Hazırlıklı R5.1.4 — Night Lock
   Scope:
   - desktop auth becomes one compact premium entry surface
   - no fake/public memory completion percentage
   - desktop Work OS fills the browser instead of a phone-width frame
   - pricing/product language cleanup hooks
   Mobile R5.1.1 geometry is intentionally untouched.
============================================================ */

/* ---------- Desktop auth: one surface, one viewport, no split-marketing void ---------- */
@media (min-width:768px){
  html:has(body.hz-auth-page),
  body.hz-auth-page{
    width:100%!important;
    height:100dvh!important;
    min-height:100dvh!important;
    overflow:hidden!important;
    background:
      radial-gradient(62% 52% at 50% -6%,var(--accent-10),transparent 66%),
      var(--background)!important;
  }

  body.hz-auth-page > .relative.z-10{
    width:100%!important;
    height:100dvh!important;
    min-height:0!important;
    display:block!important;
    overflow:hidden!important;
  }

  /* The old desktop sales/benefit rail is deliberately removed from auth.
     The landing page sells the product; auth only gets the user through the door. */
  body.hz-auth-page > .relative.z-10 > section:first-child{
    display:none!important;
  }

  body.hz-auth-page > .relative.z-10 > .hz-auth-flow{
    width:100%!important;
    height:100dvh!important;
    min-height:0!important;
    padding:clamp(18px,2.4vh,26px) 28px!important;
    display:flex!important;
    align-items:flex-start!important;
    justify-content:center!important;
    overflow:hidden!important;
    background:transparent!important;
  }

  body.hz-auth-page .hz-auth-flow > .w-full.max-w-lg{
    position:relative!important;
    width:min(100%,620px)!important;
    max-width:620px!important;
    margin:0 auto!important;
    padding:0!important;
  }

  /* Brand and language now share the actual top row. No 100px+ dead zone. */
  body.hz-auth-page .hz-auth-flow a.lg\:hidden.flex.items-center{
    display:flex!important;
    width:max-content!important;
    min-height:46px!important;
    margin:0 0 clamp(12px,1.8vh,18px)!important;
    padding:0!important;
  }
  body.hz-auth-page .hz-auth-flow a.lg\:hidden.flex.items-center .w-11{
    width:42px!important;
    height:42px!important;
    border-radius:13px!important;
  }
  body.hz-auth-page .hz-auth-flow a.lg\:hidden.flex.items-center .text-2xl{
    font-size:1.55rem!important;
    line-height:1!important;
  }
  body.hz-auth-page [data-language-switcher]{
    position:absolute!important;
    top:0!important;
    right:0!important;
    z-index:3!important;
    width:auto!important;
    margin:0!important;
  }

  body.hz-auth-page .text-xs.text-cyan-400{
    margin:0!important;
    font-size:10px!important;
    line-height:1!important;
    letter-spacing:.18em!important;
    color:var(--accent-strong)!important;
  }
  body.hz-auth-page h2{
    max-width:590px!important;
    margin:7px 0 0!important;
    font-size:clamp(2.15rem,3.1vw,3rem)!important;
    line-height:.98!important;
    letter-spacing:-.045em!important;
  }
  body.hz-auth-page h2 + p{
    max-width:560px!important;
    margin:9px 0 0!important;
    font-size:.9rem!important;
    line-height:1.45!important;
    color:var(--text-secondary)!important;
  }

  body.hz-auth-page form{
    width:100%!important;
    margin:clamp(12px,1.8vh,18px) 0 0!important;
    padding:clamp(13px,1.7vh,17px)!important;
    border:1px solid var(--border)!important;
    border-radius:20px!important;
    background:linear-gradient(180deg,var(--surface-elevated),var(--surface))!important;
    box-shadow:var(--shadow-raised)!important;
  }
  body.hz-auth-page form.space-y-5 > :not([hidden]) ~ :not([hidden]){
    margin-top:9px!important;
  }
  body.hz-auth-page label{
    margin-bottom:5px!important;
    font-size:11px!important;
    line-height:1.2!important;
  }
  body.hz-auth-page .input{
    min-height:46px!important;
    padding:10px 13px!important;
    border-radius:13px!important;
    background:var(--surface-soft)!important;
  }
  body.hz-auth-page form p.text-xs{
    margin-top:4px!important;
    font-size:10px!important;
    line-height:1.3!important;
  }
  body.hz-auth-page .turnstile-wrap{
    min-height:0!important;
    margin:0!important;
  }
  body.hz-auth-page .turnstile-wrap:empty{
    display:none!important;
  }
  body.hz-auth-page form button[type="submit"]{
    position:static!important;
    width:100%!important;
    min-height:48px!important;
    margin:9px 0 0!important;
    padding:10px 14px!important;
    border-radius:13px!important;
    background:var(--accent-gradient)!important;
    color:var(--action-text)!important;
    box-shadow:var(--shadow-accent)!important;
  }
  body.hz-auth-page form + .h-px{
    display:none!important;
  }
  body.hz-auth-page form + .h-px + p,
  body.hz-auth-page .hz-public-auth-return{
    margin:11px 0 0!important;
    padding:0!important;
    font-size:11px!important;
    line-height:1.25!important;
  }

  /* Signup: only account essentials. Brand context belongs to onboarding/Brand Profile. */
  body.hz-page-signup .signup-company-field{
    display:none!important;
  }
  body.hz-page-signup #password + p{
    display:none!important;
  }
  body.hz-page-signup label.flex.items-start{
    gap:8px!important;
    margin:0!important;
    font-size:.69rem!important;
    line-height:1.25!important;
  }
  body.hz-page-signup label.flex.items-start .block.text-xs{
    display:inline!important;
    margin:0 0 0 3px!important;
    font-size:inherit!important;
  }

  /* Settings password child route: the back button is compact, never creates a new top band. */
  body.hz-auth-page .hz-settings-recovery-back{
    margin:0 0 10px!important;
    min-height:36px!important;
    padding:0 11px!important;
  }
}

/* 720–800px laptop viewports still stay one piece. */
@media (min-width:768px) and (max-height:800px){
  body.hz-auth-page > .relative.z-10 > .hz-auth-flow{
    padding-top:14px!important;
    padding-bottom:14px!important;
  }
  body.hz-auth-page .hz-auth-flow a.lg\:hidden.flex.items-center{
    min-height:40px!important;
    margin-bottom:9px!important;
  }
  body.hz-auth-page .hz-auth-flow a.lg\:hidden.flex.items-center .w-11{
    width:38px!important;
    height:38px!important;
  }
  body.hz-auth-page h2{font-size:2rem!important;margin-top:5px!important}
  body.hz-auth-page h2 + p{margin-top:6px!important;font-size:.82rem!important;line-height:1.35!important}
  body.hz-auth-page form{margin-top:9px!important;padding:11px!important}
  body.hz-auth-page form.space-y-5 > :not([hidden]) ~ :not([hidden]){margin-top:6px!important}
  body.hz-auth-page .input{min-height:42px!important;padding-top:8px!important;padding-bottom:8px!important}
  body.hz-auth-page form button[type="submit"]{min-height:44px!important;margin-top:6px!important}
  body.hz-auth-page form + .h-px + p,
  body.hz-auth-page .hz-public-auth-return{margin-top:7px!important}
}

/* ---------- Desktop Work OS: use the browser, do not render a phone mockup ---------- */
@media (min-width:768px){
  body:has(.hzv3-app){
    height:100dvh!important;
    min-height:100dvh!important;
    overflow:hidden!important;
  }
  .hzv3-app{
    width:calc(100vw - 36px)!important;
    max-width:none!important;
    height:calc(100dvh - 36px)!important;
    max-height:none!important;
    margin:18px!important;
    grid-template-columns:240px minmax(0,1fr)!important;
    grid-template-rows:78px minmax(0,1fr)!important;
    border-radius:24px!important;
  }
  .hzv3-header{
    min-height:78px!important;
    height:78px!important;
    grid-template-columns:220px minmax(0,1fr) auto!important;
  }
  .hzv3-main{
    padding:28px 34px 34px!important;
  }
  .hzv3-page{
    width:100%!important;
    max-width:1120px!important;
    margin:0 auto!important;
  }
  .hzv3-page-home{
    display:grid!important;
    grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr)!important;
    grid-template-areas:
      "hero hero"
      "command memory"
      "solutions memory"
      "featuredHead featuredHead"
      "featured featured"!important;
    gap:14px 18px!important;
    align-content:start!important;
  }
  .hzv3-page-home > .hzv3-hero{grid-area:hero!important;text-align:left!important;margin-bottom:4px!important}
  .hzv3-page-home > .hzv3-home-command{grid-area:command!important;margin:0!important}
  .hzv3-page-home > .hzv3-see-solutions{grid-area:solutions!important;margin:0!important}
  .hzv3-page-home > .hzv3-memory-strip{grid-area:memory!important;margin:0!important;align-self:stretch!important;min-height:0!important}
  .hzv3-page-home > .hzv3-featured-head{grid-area:featuredHead!important;margin:8px 0 0!important}
  .hzv3-page-home > .hzv3-featured-grid{grid-area:featured!important;margin:0!important}
  .hzv3-page-home .hzv3-textarea{min-height:154px!important}
  .hzv3-page-solutions .hzv3-list{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
