/* ------------------------------------------------------------------
   EduNeX portal sign-in pages (Student and Parent).
   Full-screen photograph, brand copy on the left, sign-in card on the right.
   Palette shared with site.css.
   ------------------------------------------------------------------ */
:root{
  --rust:#B43A11; --blue:#275F90; --amber:#FAA307; --amber-soft:#F0A63C;
  --navy:#13284A; --text:#1d2a3b; --muted:#5f6f82; --field:#c9d6e4;
  --font:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --script:"Great Vibes",cursive;
}
*{box-sizing:border-box}
html,body{min-height:100%}
body{margin:0;font:16px/1.55 var(--font);color:var(--text);background:#f7f1e4}
:focus-visible{outline:3px solid var(--amber);outline-offset:3px}
img{max-width:100%;display:block}
.visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

.auth{position:relative;isolation:isolate;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;background:#f7f1e4}
/* The photograph on its own layer so it can be sharpened a little with
   contrast and colour; the source image is soft and slightly hazy. */
.auth::after{content:"";position:absolute;inset:0;z-index:-2;pointer-events:none;
  background:url("student-signin-bg.jpg") 46% bottom/cover no-repeat;
  filter:contrast(1.08) saturate(1.12) brightness(.98)}
/* Cream wash over the left of the photo so the logos and copy sit on a calm,
   light background instead of the busy school scene. */
.auth::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(90deg,rgba(251,246,236,.96) 0%,rgba(251,246,236,.9) 24%,rgba(251,246,236,.45) 32%,rgba(251,246,236,0) 39%)}
.auth-main,.auth-foot{position:relative;z-index:1}
.auth-main{flex:1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,560px);align-items:center;
  gap:40px;width:100%;max-width:1480px;margin:0 auto;padding:48px 30px 40px}

/* left: brand copy */
/* Top of the brand copy lines up with the top of the sign-in card. */
.auth-brand{align-self:stretch;display:flex;flex-direction:column;justify-content:flex-start;max-width:520px;padding-top:6px}
.logos{display:flex;align-items:center;gap:22px;margin-bottom:40px}
.logos .doe{width:108px;height:auto}
.logos .edunex{width:240px;height:auto}
.auth-brand h1,.auth-brand p,.auth-eyebrow{text-shadow:0 0 14px rgba(251,246,236,.95),0 0 3px rgba(251,246,236,.9)}
.auth-eyebrow{font-size:15px;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:var(--rust)}
.auth-brand h1{font-family:var(--script);font-weight:400;font-size:clamp(46px,4.4vw,66px);line-height:1.2;
  color:var(--navy);margin:18px 0 28px;letter-spacing:0}
.auth-brand p{font-size:18px;font-weight:600;line-height:1.55;color:#172f4f;margin:0;max-width:34ch}

/* right: card */
.auth-card{background:rgba(255,255,255,.97);border:1px solid #e4ebf3;border-radius:30px;
  box-shadow:0 24px 60px rgba(19,40,74,.16);padding:34px 22px 28px}
.auth-card h2{text-align:center;font-size:clamp(26px,2.4vw,33px);font-weight:800;letter-spacing:-.045em;
  line-height:1.15;color:var(--navy);margin:0}
.auth-card .sub{text-align:center;color:var(--muted);font-size:17px;margin:10px 0 26px}
.field-label{display:block;font-weight:750;font-size:15.5px;color:#13233a;margin:0 0 10px}
.field{position:relative;display:flex;align-items:center;margin-bottom:22px;border:2px solid var(--field);
  border-radius:13px;background:#fff;min-height:62px;transition:border-color .15s,box-shadow .15s}
.field:focus-within{border-color:var(--blue);box-shadow:0 0 0 4px rgba(39,95,144,.14)}
.field.invalid{border-color:var(--rust)}
.field svg{flex:0 0 22px;width:22px;height:22px;margin-left:20px;color:#3b5576}
.field input{flex:1;min-width:0;border:0;outline:0;background:transparent;font:inherit;font-size:18px;
  color:var(--text);padding:14px 16px 14px 14px}
.field input::placeholder{color:#6d7b8c}
.reveal{border:0;background:transparent;cursor:pointer;padding:10px 16px;color:#275F90;display:grid;place-items:center;border-radius:10px}
.reveal svg{margin:0}
.row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-4px 0 22px;font-size:15.5px}
.check{display:flex;align-items:center;gap:12px;color:#384b61;cursor:pointer}
.check input{width:24px;height:24px;margin:0;accent-color:var(--blue)}
.row a{color:var(--blue);font-weight:500;text-underline-offset:3px}
.btn-signin{width:100%;min-height:64px;border:0;border-radius:13px;background:var(--amber-soft);color:#13233a;
  font:inherit;font-size:22px;font-weight:800;letter-spacing:-.02em;cursor:pointer;display:flex;align-items:center;
  justify-content:center;gap:12px;transition:background .15s}
.btn-signin:hover{background:var(--amber)}
.btn-signin[disabled]{opacity:.65;cursor:progress}
.alert{border-radius:12px;padding:12px 16px;margin:0 0 18px;font-size:15px;line-height:1.5}
.alert.error{background:#fdeee8;border:1px solid #f1c3b1;color:#7c2a0d}
.alert.info{background:#eaf2fb;border:1px solid #c7dbef;color:#1c4268}
.alert.ok{background:#eaf8f0;border:1px solid #c1e6d0;color:#205c40}
.help{display:flex;align-items:center;justify-content:space-between;gap:14px;background:#eef4fb;border-radius:16px;
  padding:14px 14px 14px 16px;margin-top:22px}
.help strong{display:block;font-size:20px;color:#13233a;letter-spacing:-.02em}
.help span{font-size:15px;color:#4c5f75}
.btn-outline{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;border:2px solid var(--navy);border-radius:11px;
  background:#fff;color:var(--navy);font-weight:750;font-size:15.5px;text-decoration:none;padding:11px 14px}
.btn-outline:hover{background:#f5f8fc}
.back-link{display:flex;justify-content:center;align-items:center;gap:8px;margin-top:24px;font-size:19px;font-weight:800;
  color:var(--blue);text-decoration:none}
.back-link:hover{text-decoration:underline}

.auth-foot{text-align:center;padding:10px 16px;background:rgba(255,255,255,.88);border-top:1px solid #e7e9ee;
  color:#4e5a68;font-size:15px}

/* ---------------- Parent Portal variant ---------------- */
/* Parent background: one full-screen photo with cream fades built in on
   both sides (behind the copy and the card). */
/* Parent background: one wide photo (1854:848) - family and table in the
   middle, sky and table carried out to both sides under a cream haze. */
.auth.parent::after{background:#f7f1e4 url("parent-signin-bg.jpg") 48% bottom/cover no-repeat;filter:none}
@media (min-width:1001px){
  /* Cover the window, sliding sideways so the family (centre 48% across)
     sits midway between the copy and the card. */
  .auth.parent{--bw:max(100vw, (100vh - 44px) * 2.186)}
  .auth.parent::after{background-size:var(--bw) calc(100% - 44px);background-position:clamp(calc(100vw - var(--bw)), calc(25px + 50vw - var(--bw) * .481), 0px) top}
}
.auth.parent::before{display:none}
.btn-ghost{display:flex;align-items:center;justify-content:center;gap:10px;min-height:54px;padding:10px 14px;
  border:1.5px solid #c9d6e4;border-radius:13px;background:#fff;color:var(--navy);font:inherit;font-size:16.5px;
  font-weight:750;text-decoration:none;cursor:pointer;transition:background .15s,border-color .15s}
.btn-ghost:hover{background:#f3f7fc;border-color:#aec3da}
.btn-ghost svg{flex:0 0 22px;width:22px;height:22px;color:var(--blue)}
.btn-ghost.wide{width:100%;margin-top:16px}
.btn-ghost.recover-btn{margin-top:10px}
.btn-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}
.note{margin:18px 0 0;padding:14px 16px;background:#eef3fa;border-left:4px solid var(--blue);border-radius:4px 12px 12px 4px;
  color:#3a4b5f;font-size:14.5px;line-height:1.55}
.auth.parent .auth-card form .field{margin-bottom:18px}

/* ---------------- responsive ---------------- */
@media (max-width:1000px){
  .auth::after{background-position:38% bottom}
  .auth::before{display:none}
  .auth-main{grid-template-columns:minmax(0,1fr);align-content:start;max-width:600px;gap:28px;padding:28px 16px 32px}
  .auth-brand{max-width:none}
  .logos{gap:14px;margin-bottom:28px}
  .logos .doe{width:72px}
  .logos .edunex{width:160px}
  .auth-brand h1{margin:10px 0 14px}
  .auth-brand p{font-size:16.5px}
  /* keep the copy readable over the busy middle of the photo */
  .auth-brand{background:rgba(255,250,240,.82);border-radius:20px;padding:22px 20px;backdrop-filter:blur(2px)}
}
@media (max-width:480px){
  .btn-pair{grid-template-columns:minmax(0,1fr)}
  .auth-card{padding:28px 16px 22px;border-radius:22px}
  .row{flex-wrap:wrap}
  .help{flex-direction:column;align-items:flex-start}
  .btn-signin{font-size:20px;min-height:58px}
  .field input{font-size:16.5px}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

/* Both sign-in pages on desktop: compact 430px card on the right. */
@media (min-width:1001px){
  /* Student photo (1681:936, so 180vh wide at full height) shifted right so
     the left-most student (28% across the image) starts just after the
     heading (~480px from the content edge; content is centred, max 1480px). */
  .auth:not(.parent)::after{background-size:auto 100%;
    background-position:calc(480px + max(0px, (100vw - 1480px) / 2) - 50.3vh) bottom}
  .auth.parent .auth-main{max-width:none;grid-template-columns:minmax(0,1fr) minmax(0,430px);
    padding-left:max(30px,2.4vw);padding-right:max(30px,2.4vw)}
  .auth .auth-card{padding:26px 20px 22px;border-radius:24px}
  .auth .auth-card h2{font-size:27px}
  .auth .auth-card .sub{font-size:15.5px;margin:8px 0 20px}
  .auth .field-label{font-size:14.5px;margin-bottom:8px}
  .auth .auth-card form .field{min-height:48px;margin-bottom:14px;border-radius:11px}
  .auth .field svg{width:20px;height:20px;flex-basis:20px;margin-left:16px}
  .auth .field input{font-size:16.5px;padding:10px 12px}
  .auth .btn-signin{min-height:48px;font-size:19px;border-radius:11px}
  .auth .btn-ghost{min-height:44px;font-size:15px;border-radius:11px}
  .auth .btn-ghost svg{width:20px;height:20px;flex-basis:20px}
  .auth .btn-ghost.wide{margin-top:14px}
  .auth .btn-pair{gap:10px;margin-top:10px}
  .auth .note{margin-top:14px;padding:11px 14px;font-size:13.5px}
  /* Student page: same 430px card column as the Parent Portal sign-in. */
  .auth:not(.parent) .auth-main{grid-template-columns:minmax(0,1fr) minmax(0,430px)}
  .auth .reveal{padding:8px 14px}
  .auth .row{margin:-2px 0 16px;font-size:14.5px}
  .auth .check input{width:20px;height:20px}
  .auth .help{margin-top:16px;padding:12px 12px 12px 14px;border-radius:13px}
  .auth .help strong{font-size:17px}
  .auth .help span{font-size:13.5px}
  .auth .btn-outline{font-size:14px;padding:8px 12px;border-radius:10px}
  .auth .back-link{margin-top:16px;font-size:16px}
}
@media (max-width:1000px){
  .auth.parent::before{display:none}
}
