/* Blue Jay Travels — Agent Portal, sign-in page.

   Layout follows the reference screenshot (ref/1.png): a full-bleed travel
   photo, the brand top-left, the welcome copy and quick links on the left,
   the sign-in card on the right, a bordered grid of ten feature tiles pinned
   bottom-left, and a one-line footer. Colours come from tokens.css, the
   Blue Jay brand system used by the Accounts Portal. */

:root {
  --gutter: 57px;            /* left / right page margin, as in the reference */
  --card-w: 400px;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(9, 68, 93, .28);
}

* { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100%;
  font-family: var(--font);
  font-size: 15px; line-height: 1.5; color: var(--white);
  background: var(--brand-900);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; }
button { font: inherit; }

/* ---------- the scene ---------- */
.scene {
  position: fixed; inset: 0; z-index: -1;
  background: url("../img/bg.jpg") center 60% / cover no-repeat var(--brand-900);
}
/* A navy wash from the left (text lives there) and a gentle darkening
   towards the bottom (the feature grid and footer live there), so white type
   stays readable wherever the photo is bright. */
.scene::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 68, 93, .62) 0%, rgba(9, 68, 93, .30) 42%, rgba(9, 68, 93, .10) 70%, rgba(9, 68, 93, .22) 100%),
    linear-gradient(180deg, rgba(10, 24, 32, .18) 0%, rgba(10, 24, 32, .05) 35%, rgba(10, 24, 32, .50) 100%);
}

.portal { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- header: the brands ---------- */
.top { padding: 20px var(--gutter) 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; flex-direction: column; gap: 6px; }
.brand-row { display: flex; align-items: center; gap: 10px; }
.brand-plate {
  display: flex; align-items: center; gap: 14px;
  padding: 7px 16px; border-radius: var(--radius);
  background: rgba(255, 255, 255, .96); box-shadow: 0 6px 20px rgba(9, 68, 93, .25);
}
.logo-bj { height: 44px; width: auto; }
.logo-sh { height: 52px; width: auto; }
.brand-sep { width: 1px; height: 34px; background: var(--line); }
.brand-iata {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 12px 6px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .96); box-shadow: 0 6px 20px rgba(9, 68, 93, .25);
}
.brand-iata img { height: 24px; width: auto; }
.brand-iata span { font-size: 9.5px; line-height: 1.1; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.brand-caption { font-size: 13px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--white); opacity: .92; padding-left: 2px; }

/* ---------- hero: copy left, sign-in right, features bottom-left ---------- */
.hero {
  flex: 1; display: grid;
  grid-template-columns: minmax(0, 780px) minmax(32px, 1fr) var(--card-w);
  grid-template-rows: auto 1fr auto;
  column-gap: 32px; row-gap: 28px;
  padding: 36px var(--gutter) 22px;
}
.intro { grid-column: 1; grid-row: 1; padding-top: 34px; max-width: 640px; }
.login { grid-column: 3; grid-row: 1 / span 2; align-self: start; }
.features { grid-column: 1; grid-row: 3; }

/* welcome line + quick links */
.welcome {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  margin: 0 0 8px; font-size: 15px; font-weight: 500; letter-spacing: .3px; text-transform: uppercase;
}
.welcome strong { font-weight: 800; letter-spacing: .4px; }
.quick { display: inline-flex; gap: 14px; text-transform: none; letter-spacing: 0; }
.quick a { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600; padding: 2px 0; border-bottom: 2px solid transparent; transition: border-color .15s ease; }
.quick a:hover { border-bottom-color: var(--brand-400); }
.quick svg { width: 24px; height: 24px; fill: var(--white); }

.tag { margin: 0 0 22px; font-size: 15px; font-weight: 500; }
.desc { margin: 0 0 22px; font-size: 15px; line-height: 1.55; max-width: 590px; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.btn-register {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  background: var(--white); color: var(--ink); font-size: 15px; font-weight: 600;
  box-shadow: 0 6px 18px rgba(9, 68, 93, .25);
  transition: transform .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn-register:hover { color: var(--brand-700); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(9, 68, 93, .32); }

/* ---------- sign-in card ---------- */
.login {
  width: 100%; max-width: var(--card-w);
  background: rgba(36, 42, 46, .88); border-radius: 8px;
  padding: 34px 40px 32px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: cardIn .55s cubic-bezier(.22, .9, .34, 1) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.login h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.field { position: relative; margin-bottom: 24px; }
.field input {
  width: 100%; margin: 0; padding: 20px 0 8px; border: 0; border-radius: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .62);
  background: transparent; color: var(--white); font: inherit; font-size: 14.5px; outline: 0;
  -webkit-appearance: none; appearance: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field-pw input { padding-right: 36px; }
.field input:focus { border-bottom-color: var(--brand-400); box-shadow: 0 1px 0 var(--brand-400); }
.field input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 100px #2b3236 inset; transition: background-color 9999s; }
.field label {
  position: absolute; left: 0; top: 19px; margin: 0;
  font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .92);
  pointer-events: none; transition: top .15s ease, font-size .15s ease, color .15s ease;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label { top: 0; font-size: 11.5px; color: var(--brand-400); }
.toggle-pw {
  position: absolute; right: 0; top: 16px; width: 30px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; padding: 0; color: var(--white); cursor: pointer; opacity: .9;
}
.toggle-pw:hover { opacity: 1; }
.toggle-pw svg { width: 20px; height: 20px; }
.forgot { display: flex; justify-content: flex-end; margin: -4px 0 26px; }
.forgot a { font-size: 14px; font-weight: 500; color: var(--white); border-bottom: 1px solid transparent; }
.forgot a:hover { border-bottom-color: var(--brand-400); }
.btn-login {
  width: 100%; height: 40px; border: 0; border-radius: 4px;
  background: var(--brand); color: var(--white); font-size: 15px; font-weight: 600; letter-spacing: .2px;
  cursor: pointer; box-shadow: 0 8px 20px -6px rgba(16, 129, 177, .7);
  transition: background .15s ease, transform .15s ease;
}
.btn-login:hover { background: var(--brand-700); }
.btn-login:active { transform: translateY(1px); }
.btn-login[disabled] { opacity: .6; cursor: progress; }
.form-msg { margin: 0 0 14px; padding: 9px 12px; border-radius: 6px; font-size: 13px; background: rgba(179, 38, 30, .22); border: 1px solid rgba(255, 255, 255, .18); }
.form-msg[hidden] { display: none; }

/* the demo agent under the sign-in button (config demo.show_logins_on_signin) */
.demo-login { margin: 16px 0 0; padding: 10px 12px; border-radius: 6px; background: rgba(255, 255, 255, .08); border: 1px dashed rgba(255, 255, 255, .28); font-size: 12.5px; color: rgba(255, 255, 255, .85); }
.demo-login p { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 4px; font-weight: 700; }
.demo-login button { border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; padding: 2px 10px; background: none; color: var(--white); font: inherit; font-size: 12px; cursor: pointer; }
.demo-login button:hover { background: rgba(255, 255, 255, .14); }
.demo-login small { display: block; font-size: 11.5px; line-height: 1.4; word-break: break-word; }

/* ---------- feature tiles ---------- */
.features {
  width: 100%; max-width: 740px;
  border: 1px solid rgba(255, 255, 255, .6); border-radius: 12px;
  background: rgba(10, 24, 32, .30);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  padding: 20px 14px 16px;
}
.features ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.tile {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 10px 6px 12px; border-radius: 10px;
  transition: background .15s ease;
}
.tile:hover { background: rgba(255, 255, 255, .16); }
.tile-icon {
  width: 70px; height: 70px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); box-shadow: 0 6px 16px rgba(9, 68, 93, .35);
}
.tile-icon svg { width: 36px; height: 36px; fill: none; stroke: var(--white); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tile-label { margin-top: 12px; font-size: 14.5px; font-weight: 700; line-height: 1.25; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }

/* ---------- footer ---------- */
.foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px;
  padding: 0 var(--gutter) 16px; font-size: 12.5px; color: rgba(255, 255, 255, .92);
}
.foot a:hover { text-decoration: underline; }
.foot-right { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; }
.foot-right span, .foot-right a { display: inline-flex; align-items: center; gap: 6px; }
.foot svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- breakpoints ---------- */
/* A laptop at 1366 x 768: everything, the ten tiles included, fits above
   the fold without the page scrolling. */
@media (min-width: 1101px) and (max-height: 840px) {
  .top { padding-top: 14px; }
  .hero { padding-top: 18px; padding-bottom: 14px; row-gap: 14px; }
  .intro { padding-top: 14px; }
  .tag { margin-bottom: 12px; }
  .desc { margin-bottom: 16px; }
  .features { padding: 12px 10px 8px; }
  .tile { padding: 6px 6px 8px; }
  .tile-icon { width: 58px; height: 58px; }
  .tile-icon svg { width: 30px; height: 30px; }
  .tile-label { margin-top: 8px; font-size: 13.5px; }
  .login { padding: 28px 36px 26px; }
  .foot { padding-bottom: 12px; }
}

@media (max-width: 1280px) {
  :root { --gutter: 36px; --card-w: 380px; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(16px, .1fr) var(--card-w); }
  .features { max-width: 700px; }
  .tile-label { font-size: 13.5px; }
}

@media (max-width: 1100px) {
  :root { --gutter: 28px; }
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; row-gap: 26px; padding-top: 26px; }
  .intro { grid-column: 1; grid-row: 1; padding-top: 10px; }
  .login { grid-column: 1; grid-row: 2; max-width: 440px; }
  .features { grid-column: 1; grid-row: 3; max-width: 760px; }
  .features ul { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .features ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .features { max-width: none; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 14px; }
  .top { padding-top: 14px; }
  .brand-plate { gap: 10px; padding: 6px 12px; }
  .logo-bj { height: 34px; }
  .logo-sh { height: 40px; }
  .brand-sep { height: 26px; }
  .brand-iata span { display: none; }
  .brand-iata { padding: 6px 8px; }
  .welcome { font-size: 14px; }
  .quick a { font-size: 15px; }
  .login { max-width: none; padding: 26px 22px 24px; }
  .features ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-icon { width: 60px; height: 60px; }
  .tile-icon svg { width: 30px; height: 30px; }
  .tile-label { font-size: 13.5px; }
  .foot { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .login { animation: none; }
  .btn-register, .btn-login, .tile, .quick a, .field input, .field label { transition: none; }
}

/* ======================================================================
   Register and Forgot password: the same scene and card as the sign-in
   page (no capture showed these screens; they follow the sign-in page).
   The hero becomes two columns - the copy left, one card right - and the
   card grows wider for the registration form.
   ====================================================================== */
.hero.auth { grid-template-columns: minmax(0, 1fr) var(--card-w); grid-template-rows: auto; align-items: start; column-gap: 48px; }
.hero.auth .intro { grid-column: 1; grid-row: 1; padding-top: 22px; }
.hero.auth .login { grid-column: 2; grid-row: 1; }
.hero.auth-wide { --card-w: 660px; }
.intro h1 { margin: 0 0 14px; font-size: 32px; font-weight: 800; line-height: 1.15; letter-spacing: -.3px; text-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.perks { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 10px; max-width: 520px; }
.perks li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.perks svg { flex: none; width: 22px; height: 22px; margin-top: 1px; fill: none; stroke: var(--brand-400); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.intro .alt { margin: 0; font-size: 14.5px; }
.intro .alt a { font-weight: 700; border-bottom: 1px solid rgba(255, 255, 255, .6); }
.intro .alt a:hover { border-bottom-color: var(--brand-400); }

.login.wide { padding: 30px 36px 28px; }
.login h2 { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.login .lead { margin: 0 0 18px; font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, .8); }
.login .lead b { color: var(--white); }
.fsec { margin: 20px 0 10px; font-size: 11.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--brand-400); }
.fsec.first { margin-top: 2px; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.fgrid .span-2 { grid-column: 1 / -1; }
.field-split { display: grid; grid-template-columns: 92px minmax(0, 1fr); column-gap: 12px; }
.field select {
  width: 100%; margin: 0; padding: 20px 22px 8px 0; border: 0; border-radius: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .62); color: var(--white); font: inherit; font-size: 14.5px; outline: 0;
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background: transparent url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round'/></svg>") no-repeat right 2px bottom 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field select option { color: var(--ink); background: var(--white); }
.field select:focus { border-bottom-color: var(--brand-400); box-shadow: 0 1px 0 var(--brand-400); }
/* a select's label floats once a value is chosen (the page adds .set), like an input's */
.field select:focus + label, .field select.set + label { top: 0; font-size: 11.5px; color: rgba(255, 255, 255, .78); }
.field select:focus + label { color: var(--brand-400); }
.field .ferr { display: block; margin-top: 5px; font-size: 12px; color: #F6A89F; }
.field.invalid input, .field.invalid select { border-bottom-color: #F28B82; }
.field.invalid label { color: #F6A89F; }
.agree { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 22px; font-size: 13.5px; line-height: 1.45; cursor: pointer; }
.agree input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--brand); }
.agree a { border-bottom: 1px solid rgba(255, 255, 255, .5); }
.agree a:hover { border-bottom-color: var(--brand-400); }
.agree.invalid { color: #F6A89F; }
.form-msg.ok { background: rgba(16, 129, 177, .28); }
.login .back { margin: 18px 0 0; text-align: center; font-size: 14px; }
.login .back a { border-bottom: 1px solid transparent; }
.login .back a:hover { border-bottom-color: var(--brand-400); }
.login .back .sep { margin: 0 10px; opacity: .5; }
.hint-pw { margin: 8px 0 20px; font-size: 12px; color: rgba(255, 255, 255, .65); }
.meter { height: 4px; margin: -14px 0 0; border-radius: 2px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--brand-400); transition: width .2s ease, background .2s ease; }
.meter.weak i { width: 33%; background: #F28B82; }
.meter.fair i { width: 66%; background: #F5C26B; }
.meter.strong i { width: 100%; background: #7BD3A2; }
.done { text-align: center; padding: 8px 0 2px; }
.done .tick { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; box-shadow: 0 8px 20px -6px rgba(16, 129, 177, .8); }
.done .tick svg { width: 32px; height: 32px; fill: none; stroke: var(--white); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.done h2 { margin-bottom: 10px; }
.done p { margin: 0 0 10px; font-size: 14px; line-height: 1.55; color: rgba(255, 255, 255, .85); }
.done p b { color: var(--white); }
.done .ref { display: inline-block; margin: 4px 0 14px; padding: 7px 16px; border-radius: 6px; background: rgba(255, 255, 255, .1); border: 1px dashed rgba(255, 255, 255, .45); font-weight: 700; letter-spacing: 1.2px; }
.done .btn-login { margin-top: 10px; }
.done .btn-login.link { display: inline-flex; align-items: center; justify-content: center; }
.state[hidden] { display: none; }

@media (max-width: 1280px) {
  .hero.auth-wide { --card-w: 600px; }
  .hero.auth { column-gap: 32px; }
}
@media (max-width: 1100px) {
  .hero.auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; }
  .hero.auth .intro { padding-top: 10px; }
  .hero.auth .login { grid-column: 1; grid-row: 2; max-width: 660px; }
  .intro h1 { font-size: 28px; }
}
@media (max-width: 640px) {
  .fgrid { grid-template-columns: 1fr; }
  .login.wide { padding: 26px 22px 24px; }
  .intro h1 { font-size: 24px; }
  .perks li { font-size: 14px; }
}
