/* Dataroom login: full-bleed hero + centred white card, matched to
   assets.longstraw.earth (Sage mobile design, 09-Nov-2026).
   Values mirrored from /srv/opencloud/branding/auth-login.css:
   card max-width 400, radius 16, padding 30/26, hero gradient + same photo,
   phone framing auto 160% / 6% 100%, footer over the photo at the bottom. */

@media (max-width:860px){
  body{background:#142832}

  div.flex.min-h-screen.flex-col:has(>aside){
    position:relative;min-height:100vh;min-height:100dvh;background:#142832
  }

  /* hero becomes a full-bleed background layer behind the card */
  div.flex.min-h-screen.flex-col:has(>aside)>aside{
    position:absolute;inset:0;width:auto;height:auto;min-height:100%;
    padding:0;z-index:0;pointer-events:none;
    background-image:linear-gradient(180deg,rgba(14,31,39,.40) 0%,rgba(14,31,39,.58) 50%,rgba(14,31,39,.76) 100%),url("/brand/left-panel.jpg?v=2")!important;
    background-size:cover,auto 160%!important;
    background-position:center,6% 100%!important
  }
  div.flex.min-h-screen.flex-col:has(>aside)>aside>*{display:none}

  /* form column sits on top, centred */
  div.flex.min-h-screen.flex-col:has(>aside)>main{
    position:relative;z-index:1;display:flex;align-items:center;justify-content:center;
    flex:1 0 auto;min-height:100vh;min-height:100dvh;
    /* bottom padding 58 keeps the card at the same height on screen as assets
       (assets centres the panel inside a column that also carries its footer) */
    padding:max(28px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 58px max(16px,env(safe-area-inset-left))
  }

  /* the white card */
  div.flex.min-h-screen:has(>aside)>main>div.w-full.max-w-md{
    width:100%;max-width:400px;margin:auto;box-sizing:border-box;
    padding:30px clamp(20px,6vw,32px) 26px;
    background:#fff;border-radius:16px;
    box-shadow:0 1px 2px rgba(6,20,26,.10),0 18px 48px rgba(6,20,26,.40)
  }

  /* footer leaves the card and sits on the photo, like assets */
  div.flex.min-h-screen:has(>aside)>main>div.w-full.max-w-md>div:last-child{
    position:fixed;left:0;right:0;bottom:0;z-index:2;margin:0;padding:0 max(16px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
    color:rgba(255,255,255,.72);line-height:1.9
  }
  main>div.w-full.max-w-md>div:last-child a{color:rgba(255,255,255,.78)}
  main>div.w-full.max-w-md>div:last-child a:hover{color:#fff}
}

@media (max-width:380px){
  div.flex.min-h-screen:has(>aside)>div.flex.min-h-screen:has(>aside)>main>div.w-full.max-w-md>div:last-child{font-size:11.5px}
}

/* short landscape phones: trim the card so it still fits */
@media (max-width:860px) and (max-height:520px){
  div.flex.min-h-screen:has(>aside)>main>div.w-full.max-w-md{padding-top:20px;padding-bottom:20px}
}



/* desktop: footer leaves the card and pins to the bottom of the right column,
   exactly like assets (.sb-footer: fixed, left = panel start, bottom 22px) */
@media (min-width:861px){
  div.flex.min-h-screen:has(>aside)>main>div.w-full>div:last-child{
    position:fixed;left:44%;right:0;bottom:22px;margin:0;padding:0;
    justify-content:center;color:#9ca3af;font-size:12px;line-height:14px
  }
  div.flex.min-h-screen:has(>aside)>main>div.w-full>div:last-child a{color:#9ca3af}
}

/* footer: assets shows one line only (links); hide the app version + language row */
main>div.w-full.max-w-md>div:last-child>div:nth-child(2){display:none}

/* brand-coloured focus ring, matching assets */
.theme-form input:focus, .sb-inline input:focus, form input:focus{
  outline-color:#17667d!important;border-color:#17667d!important
}
