/* Sign-in pages (Nov 17): the homepage prayer-hall photo behind everything, the First Hijrah name and how the
   account is protected beside the card on wide screens, a short photo band above it on phones. One layout for
   every sign-in page; only the presentation changes with the screen. Loaded after auth-refresh.css. */
.fa{--fa-green:#004d38;--fa-deep:#012e22;--fa-gold:#d9b25f;--fa-ivory:#fffdf7;--fa-card:rgba(255,253,247,.97);--fa-ink:#12352b;--fa-muted:#5a6e65;--fa-line:#e1e4dc}
html[data-cms-theme=dark] .fa{--fa-card:rgba(19,37,43,.96);--fa-ink:#eef5f3;--fa-muted:#a9bcc4;--fa-line:#2f444c}
body.fhf-auth.fa{min-height:100vh;min-height:100dvh;margin:0;overflow-x:hidden;background:var(--fa-deep);color:var(--fa-ink)}

/* Photo */
.fa-bg{position:fixed;inset:0;z-index:0;overflow:hidden;background:var(--fa-deep)}
.fa-bg picture,.fa-bg img{display:block;width:100%;height:100%}
.fa-bg img{object-fit:cover;object-position:center 35%;transform-origin:60% 40%}
.fa-bg::after{content:"";position:absolute;inset:0;background:linear-gradient(100deg,rgba(1,46,34,.94) 0%,rgba(1,46,34,.82) 38%,rgba(1,46,34,.42) 70%,rgba(1,46,34,.30) 100%)}

/* Frame */
.fa .fa-shell{position:relative;z-index:1;box-sizing:border-box;width:100%;max-width:none;margin:0;padding:0}
.fa .fa-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.fa .auth-back{display:inline-flex;align-items:center;gap:6px;margin:0;color:#fff;font-size:14px;font-weight:600;text-decoration:none;opacity:.92}
.fa .auth-back:hover{opacity:1;text-decoration:underline}
.fa .auth-back .fhf-icon{transform:scaleX(-1)}
html[dir=rtl] .fa .auth-back .fhf-icon{transform:none}
.fa .interface-actions{margin:0}
.fa .fhf-language>summary{border-color:rgba(255,255,255,.55)!important;background:rgba(1,46,34,.35)!important;color:#fff!important;backdrop-filter:blur(4px)}

/* Brand side */
.fa .fa-intro{color:#fff}
.fa .auth-brand{height:auto;padding:0;background:none;display:block}
.fa .auth-brand::after{display:none}
.fa .auth-brand a{display:inline-grid;place-items:center;width:auto;height:auto;margin:0;padding:0;border-radius:0;background:none;box-shadow:none}
.fa .auth-brand img{height:auto;filter:drop-shadow(0 6px 14px rgba(0,0,0,.35))}
.fa .fa-name{margin:0;font:700 22px/1.15 Georgia,"Times New Roman",serif;letter-spacing:.01em}
.fa .fa-tagline{margin:6px 0 0;color:rgba(255,255,255,.88);font-size:15px}
.fa .fa-secure{display:grid;gap:10px;margin:0;padding:0;list-style:none}
.fa .fa-secure li{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;align-items:center;font-size:13.5px;line-height:1.35;color:rgba(255,255,255,.9)}
.fa .fa-secure .fhf-icon{width:34px;height:34px;padding:8px;box-sizing:border-box;border-radius:10px;background:rgba(255,255,255,.12);color:var(--fa-gold)}
.fa .fa-secure strong{display:block;color:#fff;font-size:14px}

/* Card */
.fa .fa-card{box-sizing:border-box;width:100%;border:1px solid rgba(255,255,255,.6);border-radius:20px;background:var(--fa-card);box-shadow:0 24px 60px -20px rgba(0,0,0,.55);overflow:hidden}
.fa .auth-card-body{padding:22px 26px 14px}
.fa h1{margin:0;text-align:center;color:var(--fa-ink);font:700 clamp(24px,2.4vw,30px)/1.15 Georgia,"Times New Roman",serif}
.fa .auth-subtitle{margin:4px 0 0;text-align:center;color:var(--fa-muted);font-size:14.5px}
.fa .auth-subtitle::after{content:"";display:block;width:120px;height:2px;margin:10px auto 0;background:linear-gradient(90deg,transparent,var(--fa-gold),transparent)}
.fa .auth-form{gap:12px;margin-top:14px}
.fa .fhf-field label{margin-bottom:5px;font-size:13.5px}
.fa :is(input:not([type=checkbox]):not([type=hidden]),select),.fa .auth-password{min-height:44px;border-radius:10px}
.fa .auth-password input:not([type=checkbox]):not([type=hidden]){min-height:41px!important}
.fa .auth-help{margin:-6px 0 0 30px;font-size:12px;line-height:1.35}
.fa .auth-primary{min-height:46px;border-radius:10px;background:linear-gradient(110deg,#0a7a58,var(--fa-deep));transition:transform .2s ease,box-shadow .2s ease,filter .2s ease}
.fa .auth-primary:hover{transform:translateY(-1px);box-shadow:0 12px 22px -10px rgba(0,77,56,.65)}
.fa .auth-primary:active{transform:translateY(0)}
.fa .auth-or{display:flex;align-items:center;gap:10px;margin:10px 0 8px;color:var(--fa-muted);font-size:12.5px}
.fa .auth-or::before,.fa .auth-or::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,transparent,var(--fa-gold))}
.fa .auth-or::after{background:linear-gradient(90deg,var(--fa-gold),transparent)}
.fa .auth-secondary{width:100%;min-height:42px;border-radius:10px;transition:border-color .2s ease,background .2s ease}
.fa .auth-secondary:hover{background:color-mix(in srgb,var(--fa-green) 6%,transparent)}
.fa .auth-text-link{display:block;margin:10px 0 0;text-align:center;font-weight:600}
.fa .auth-register{gap:8px;margin-top:10px;padding-top:10px;text-align:center;font-size:13.5px}
.fa .auth-register a{min-height:42px;border-radius:10px;transition:border-color .2s ease,background .2s ease}
.fa .auth-register a:hover{background:color-mix(in srgb,var(--fa-green) 6%,transparent)}
.fa :is(.auth-notice,.auth-errors){margin-bottom:10px;font-size:13.5px}
.fa .fa-card-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 12px;padding:10px 26px 14px;border-top:1px solid var(--fa-line);color:var(--fa-muted);font-size:12px}
.fa .fa-card-foot .fhf-icon{width:14px;height:14px;vertical-align:-2px;color:var(--fa-green)}
html[data-cms-theme=dark] .fa .fa-card-foot .fhf-icon{color:#7fd6b3}
.fa .fa-card-foot strong{color:var(--fa-ink)}
.fa :is(input,select,button,a):focus-visible{outline:3px solid color-mix(in srgb,var(--fa-gold) 70%,transparent);outline-offset:2px}

/* Phones and tablets: a short photo band with the logo and name side by side, the card below at full width. */
@media (max-width:1023px){
  body.fhf-auth.fa{background:var(--fa-ivory)}
  html[data-cms-theme=dark] body.fhf-auth.fa{background:#0a171c}
  .fa-bg{position:absolute;bottom:auto;height:150px}
  .fa-bg::after{background:linear-gradient(180deg,rgba(1,46,34,.8),rgba(1,46,34,.9))}
  .fa .fa-shell{display:grid;gap:0;padding:max(8px,env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom))}
  .fa .fa-top{min-height:40px}
  .fa .auth-back{font-size:13.5px}
  .fa .fhf-language>summary{min-height:32px!important;padding:2px 8px!important}
  .fa .fa-intro{display:flex;align-items:center;justify-content:center;gap:10px;padding:2px 0 14px}
  .fa .auth-brand img{width:44px}
  .fa .fa-name{font-size:18px}
  .fa .fa-tagline,.fa .fa-secure{display:none}
  .fa .fa-card{width:min(100%,520px);margin:0 auto;border-color:var(--fa-line);border-radius:16px;box-shadow:0 14px 34px -18px rgba(0,40,30,.45)}
  .fa .auth-card-body{padding:14px 16px 8px}
  .fa h1{font-size:23px}
  .fa .auth-subtitle{font-size:13.5px}
  .fa .auth-subtitle::after{margin-top:7px}
  .fa .auth-form{gap:9px;margin-top:10px}
  .fa .fhf-field label{margin-bottom:3px!important;font-size:13px!important}
  .fa :is(input:not([type=checkbox]):not([type=hidden]),select),.fa .auth-password{min-height:42px!important;font-size:16px}
  .fa .auth-password input:not([type=checkbox]):not([type=hidden]){min-height:39px!important}
  .fa .fhf-checkbox,.fa label:has(>input[type=checkbox]){font-size:13.5px!important}
  .fa .auth-help{margin-top:-7px;font-size:11.5px!important}
  .fa .auth-primary{min-height:44px;font-size:15.5px}
  .fa .auth-or{margin:8px 0 6px}
  .fa .auth-secondary{min-height:40px;font-size:14.5px}
  .fa .auth-text-link{margin-top:8px;font-size:13.5px}
  /* "New to First Hijrah? Become a member" reads as one line with a link on phones. */
  .fa .auth-register{display:block;margin-top:8px;padding-top:8px;font-size:13.5px}
  .fa .auth-register a{display:inline!important;min-height:0!important;padding:0!important;border:0!important;background:none!important;font-size:13.5px!important}
  .fa .fa-card-foot{padding:8px 16px 10px;font-size:11px}
}
@media (max-width:1023px) and (max-height:700px){
  .fa-bg{height:118px}
  .fa .fa-shell{padding-bottom:calc(2px + env(safe-area-inset-bottom))}
  .fa .fa-top{min-height:32px}
  .fa .fa-intro{padding:0 0 8px}
  .fa .auth-brand img{width:36px}
  .fa .fa-name{font-size:16.5px}
  .fa h1{font-size:21px}
  .fa .auth-subtitle{margin-top:2px;font-size:13px}
  .fa .auth-subtitle::after{display:none}
  .fa .auth-card-body{padding-top:11px}
  .fa .auth-form{gap:7px;margin-top:8px}
  .fa :is(input:not([type=checkbox]):not([type=hidden]),select),.fa .auth-password{min-height:40px!important}
  .fa .auth-password input:not([type=checkbox]):not([type=hidden]){min-height:37px!important}
  .fa .auth-help{font-size:11px!important;line-height:1.3}
  .fa .auth-primary{min-height:42px}
  .fa .auth-or{margin:6px 0 5px}
  .fa .auth-secondary{min-height:38px}
  .fa .auth-text-link{margin-top:6px}
  .fa .auth-register{margin-top:6px;padding-top:6px}
  .fa .fa-card-foot{padding:6px 16px 8px}
}
@media (max-width:360px){
  .fa .auth-card-body{padding-inline:13px}
  .fa .auth-help{margin-left:0}
}

/* Wide screens: the photo fills the window, the name and protections on the left, the card on the right. */
@media (min-width:1024px){
  .fa .fa-shell{display:grid;grid-template-columns:minmax(0,1fr) 440px;grid-template-rows:auto 1fr;column-gap:clamp(40px,7vw,120px);min-height:100vh;min-height:100dvh;width:min(1280px,100%);margin:0 auto;padding:22px clamp(28px,5vw,64px) 26px}
  .fa .fa-top{grid-column:1/-1}
  .fa .fa-intro{align-self:center;display:grid;gap:18px;max-width:440px}
  .fa .auth-brand img{width:112px}
  .fa .fa-name{font-size:clamp(28px,2.6vw,38px)}
  .fa .fa-tagline{font-size:16.5px}
  .fa .fa-tagline::after{content:"";display:block;width:140px;height:2px;margin-top:16px;background:linear-gradient(90deg,var(--fa-gold),transparent)}
  .fa .fa-card{align-self:center}
}
/* Short laptop screens: tighter, so the whole form shows without scrolling. */
@media (min-width:1024px) and (max-height:800px){
  .fa .fa-shell{padding-top:14px;padding-bottom:14px}
  .fa .auth-card-body{padding-top:16px}
  .fa .auth-form{gap:9px;margin-top:10px}
  .fa .auth-brand img{width:88px}
  .fa .fa-intro{gap:12px}
  .fa .fa-secure{gap:7px}
}

/* Motion: one gentle entrance, nothing that repeats. */
@media (prefers-reduced-motion:no-preference){
  .fa-bg img{animation:fa-zoom 16s cubic-bezier(.2,.6,.2,1) both}
  .fa .fa-intro{animation:fa-rise .7s .1s cubic-bezier(.2,.7,.2,1) both}
  .fa .fa-card{animation:fa-card .6s .2s cubic-bezier(.2,.7,.2,1) both}
  .fa .fa-secure li{animation:fa-rise .5s cubic-bezier(.2,.7,.2,1) both}
  .fa .fa-secure li:nth-child(1){animation-delay:.35s}.fa .fa-secure li:nth-child(2){animation-delay:.45s}
  .fa .fa-secure li:nth-child(3){animation-delay:.55s}.fa .fa-secure li:nth-child(4){animation-delay:.65s}
  .fa :is(.auth-errors,.auth-notice,.fhf-error){animation:fa-fade .3s ease both}
  @media (max-width:1023px){
    .fa-bg img{animation:fa-fade .6s ease both}
    .fa .fa-card{animation:fa-rise .45s .1s ease both}
  }
}
@keyframes fa-zoom{from{transform:scale(1.08)}to{transform:scale(1)}}
@keyframes fa-rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes fa-card{from{opacity:0;transform:translateX(18px)}to{opacity:1;transform:none}}
@keyframes fa-fade{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){.fa *,.fa-bg img{animation:none!important;transition:none!important}}
