/* Sign-in pages (all portals): form on the left, a rounded photo panel on the right.
   Loaded after styles.css and dark.css by scripts/add-signin-design.js. Flat colours only, no gradients.
   It restyles the existing markup (main.login > form.lbox), so no page needs different HTML. */
html body main.login[class~="login"] {
  --si-bg: #fff; --si-ink: #0A1D2E; --si-mute: #4A5A6A; --si-line: #D5DBE2; --si-btn: #0F2A41; --si-btn-h: #1B3E5C;
  background: var(--si-bg); color: var(--si-ink);
  min-height: calc(100vh - 69px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  padding: 40px 24px;
}
html body main.login > .lbox:not(.phelp) {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; max-width: 1180px; min-height: 700px; box-sizing: border-box;
  padding: 40px calc(min(100vw - 48px, 1180px) / 2 + 40px) 40px 40px;
  background: transparent; color: var(--si-ink); border: 0; border-radius: 0; box-shadow: none; animation: none;
}
html body main.login > .lbox:not(.phelp) > * { width: 100%; max-width: 400px; box-sizing: border-box; }

/* the photo panel; the multiply blend darkens it with one flat colour so the white text reads */
html body main.login > .lbox:not(.phelp)::before {
  content: ''; position: absolute; top: 0; bottom: 0; right: 0; width: calc(50% - 20px); border-radius: 26px;
  background: #8E8E8E url('../images/signin-desk.jpg') 14% 40% / cover no-repeat; background-blend-mode: multiply;
}
html body main.login > .lbox:not(.phelp)::after {
  content: ''; position: absolute; right: 48px; bottom: 44px; width: calc(50% - 116px); max-width: 520px; aspect-ratio: 520 / 230;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 520 230'%3E%3Cg fill='%23fff' font-family='Helvetica Neue,Arial,sans-serif'%3E%3Ctext x='0' y='46' font-size='46' font-weight='700'%3ELearn with%3C/text%3E%3Ctext x='0' y='98' font-size='46' font-weight='700'%3EHimaayah Schools%3C/text%3E%3Ctext x='0' y='148' font-size='20' fill-opacity='.92'%3EStructured Islamic learning for the Madrasah, TBC,%3C/text%3E%3Ctext x='0' y='176' font-size='20' fill-opacity='.92'%3ESkills School and the Academy. Learn anywhere,%3C/text%3E%3Ctext x='0' y='204' font-size='20' fill-opacity='.92'%3Eat your own pace.%3C/text%3E%3C/g%3E%3C/svg%3E") left bottom / 100% auto no-repeat;
}

/* text */
html body main.login > .lbox:not(.phelp) .kick { color: var(--si-mute); font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px; text-align: center; }
html body main.login > .lbox:not(.phelp) .kick::before { background: var(--si-mute); }
html body main.login > .lbox:not(.phelp) h1 { color: var(--si-ink); font-size: 28px; line-height: 1.15; font-weight: 600; letter-spacing: -.01em; margin-bottom: 8px; text-align: center; }
html body main.login > .lbox:not(.phelp) > p { color: var(--si-ink); font-size: 15.5px; line-height: 1.55; margin-bottom: 32px; text-align: center; }
html body main.login > .lbox:not(.phelp) .crest { width: 56px; height: 56px; border-radius: 14px; background: var(--si-btn); margin: 0 auto 24px; display: grid; place-items: center; }
html body main.login > .lbox:not(.phelp) .crest svg[fill]:not([fill="none"]) { fill: #fff; }

/* fields */
html body main.login > .lbox:not(.phelp) .f { margin-bottom: 16px; }
html body main.login > .lbox:not(.phelp) .f label { color: var(--si-ink); font-size: 13.5px; font-weight: 600; margin-bottom: 7px; }
html body main.login > .lbox:not(.phelp) :is(input, select) {
  width: 100%; padding: 15px 16px; border-radius: 8px; border: 1px solid var(--si-line); background: #fff; color: var(--si-ink);
  font-size: 15.5px; transition: border-color .15s, box-shadow .15s;
}
html body main.login > .lbox:not(.phelp) :is(input, select)::placeholder { color: #8795A3; }
html body main.login > .lbox:not(.phelp) :is(input, select):focus { outline: none; border-color: var(--si-btn); box-shadow: 0 0 0 3px rgba(15, 42, 65, .14); }
html body main.login > .lbox:not(.phelp) input:-webkit-autofill { -webkit-text-fill-color: #0A1D2E; box-shadow: 0 0 0 100px #fff inset; caret-color: #0A1D2E; }
html body main.login > .lbox:not(.phelp) .pw > button { color: var(--si-btn); }
html body main.login > .lbox:not(.phelp) .pw > button:hover { background: #EEF2F6; }
html body main.login > .lbox:not(.phelp) .err { color: #B3261E; font-size: 14px; min-height: 0; margin-bottom: 12px; }
html body main.login > .lbox:not(.phelp) .err:empty { display: none; }
html body main.login > .lbox:not(.phelp) .demo { background: #EEF2F6; color: var(--si-ink); border-radius: 10px; margin-bottom: 16px; }

/* button and links */
html body main.login > .lbox:not(.phelp) .btn { padding: 15px; border-radius: 8px; background: var(--si-btn); color: #fff; border: 0; font-size: 15.5px; font-weight: 600; box-shadow: none; margin-top: 14px; }
html body main.login > .lbox:not(.phelp) .btn:hover { background: var(--si-btn-h); }
html body main.login > .lbox:not(.phelp) .btn:disabled { opacity: .6; }
html body main.login > .lbox:not(.phelp) .hint { color: var(--si-mute); font-size: 14px; line-height: 1.6; margin-top: 20px; text-align: center; }
html body main.login > .lbox:not(.phelp) a { color: var(--si-btn); font-weight: 600; }
html body main.login > .lbox:not(.phelp) a:hover { color: var(--si-btn-h); text-decoration: underline; }

/* the "How this works" box under the card */
html body main.login > .lbox.phelp { width: 100%; max-width: 1180px; margin: 0; padding: 18px 28px; background: #F2F5F8; color: var(--si-ink); border-radius: 16px; box-shadow: none; }
html body main.login > .lbox.phelp :is(summary, h2, h3, b, strong) { color: var(--si-ink); }
html body main.login > .lbox.phelp :is(p, li, span, div) { color: var(--si-mute); }
html body main.login > .lbox.phelp a { color: var(--si-btn); }

@media (max-width: 860px) {
  html body main.login { padding: 20px 14px; min-height: calc(100vh - 61px); }
  html body main.login > .lbox:not(.phelp) { min-height: 0; padding: 0 4px 28px; }
  html body main.login > .lbox:not(.phelp)::before { position: relative; inset: auto; display: block; width: 100%; height: 190px; margin-bottom: 30px; border-radius: 20px; background-position: 14% 35%; }
  html body main.login > .lbox:not(.phelp)::after { display: none; }
  html body main.login > .lbox:not(.phelp) h1 { font-size: 26px; }
  html body main.login > .lbox.phelp { padding: 16px 20px; }
}
