/* Sign-in pages: a photographic harbour background, floating feature tiles, a glass sign-in card with animated fields, and a feature strip.
   Used by every page of the auth layout (staff sign-in, platform sign-in, two-factor, password reset). Always dark.
   The background is four separate layers (photo, navy shade, ambient light, waves) so each can be tuned on its own. The photo is public/assets/img/auth-harbour.(webp|jpg). */
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body.auth-body { margin: 0; min-height: 100vh; min-height: 100dvh; background: #050d26; color: #eaf2ff; overflow-x: hidden; overflow-x: clip; font-family: var(--font-body, "Segoe UI", system-ui, sans-serif); }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.auth-body a:focus-visible, .auth-body button:focus-visible { outline: 3px solid #7ff0e0; outline-offset: 3px; border-radius: 10px; }

/* ---- the background, in layers ---- */
.au-scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: linear-gradient(180deg, #050d26 0%, #0a1f55 55%, #16296f 100%); pointer-events: none; }
.au-photo { position: absolute; inset: -2%; background-position: 32% center; background-size: cover; background-repeat: no-repeat; opacity: 0; transition: opacity .8s ease; }
.has-photo .au-photo { opacity: 1; animation: au-drift 60s ease-in-out infinite alternate; }
@keyframes au-drift { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.08) translate3d(-1.2%, -.8%, 0); } }
.au-shade { position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(3, 10, 38, .62) 0%, rgba(5, 18, 58, .2) 30%, rgba(5, 18, 58, .28) 62%, rgba(3, 10, 38, .78) 100%),
  radial-gradient(120% 90% at 50% 45%, rgba(4, 14, 48, 0) 35%, rgba(2, 8, 30, .55) 100%); }
.au-ambient { position: absolute; inset: 0; mix-blend-mode: screen; opacity: .9; animation: au-ambient 14s ease-in-out infinite alternate;
  background: radial-gradient(48vw 42vh at 14% 22%, rgba(34, 211, 238, .22), transparent 70%), radial-gradient(46vw 40vh at 88% 30%, rgba(99, 102, 241, .26), transparent 70%), radial-gradient(60vw 30vh at 50% 105%, rgba(45, 212, 191, .2), transparent 70%); }
@keyframes au-ambient { from { opacity: .6; } to { opacity: 1; } }
.au-waves { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: clamp(110px, 18vh, 200px); opacity: .22; }
.au-wave { animation: au-sway 9s ease-in-out infinite alternate; transform-origin: center bottom; } .au-wave-2 { animation-duration: 12s; animation-delay: -3s; opacity: .7; }
@keyframes au-sway { from { transform: translateX(-2%) scaleY(.92); } to { transform: translateX(2%) scaleY(1.06); } }

/* ---- the top bar ---- */
.au-top { position: fixed; inset: 0 0 auto 0; z-index: 6; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 22px clamp(16px, 4.2vw, 64px); pointer-events: none; }
.au-top > * { pointer-events: auto; }
.au-brand { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; }
.au-brand img { width: 60px; height: 60px; border-radius: 16px; box-shadow: 0 10px 30px -8px rgba(45, 212, 191, .6); }
.au-brand b, .au-card-brand b { display: block; font: 800 2rem/1 var(--font-display, "Segoe UI", sans-serif); letter-spacing: -.03em; color: #fff; }
.au-brand b i, .au-card-brand b i { font-style: normal; color: #2fe3cf; }
.au-brand small { display: block; margin-top: 6px; font-size: .62rem; letter-spacing: .24em; text-transform: uppercase; color: #cfe0f8; }
.au-demo { margin: 0; display: flex; align-items: center; gap: 1rem; color: #e6f0ff; font-size: 1rem; }
.au-pillbtn { display: inline-flex; align-items: center; gap: .6rem; height: 52px; padding: 0 1.4rem; border-radius: 999px; background: #fff; color: #0b6b63; font-weight: 700; text-decoration: none; box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .6); transition: transform .25s cubic-bezier(.2, .9, .2, 1.3), box-shadow .25s; }
.au-pillbtn:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 18px 40px -14px rgba(45, 212, 191, .7); }
.au-pillbtn svg { width: 18px; height: 18px; }

/* ---- the headlines: independent of the card, always complete (the typing only fades the letters in) ---- */
.au-copy { position: fixed; z-index: 3; top: 17vh; max-width: 26vw; color: #fff; pointer-events: none; }
.au-copy-l { left: clamp(20px, 4.6vw, 80px); }
.au-copy-r { right: clamp(20px, 5vw, 90px); text-align: right; top: 19vh; }
.au-script { display: block; font: italic 400 clamp(1.6rem, 2.6vw, 2.5rem)/1.1 "Segoe Script", "Brush Script MT", "Lucida Handwriting", cursive; color: #8fdcff; margin-bottom: .2rem; text-shadow: 0 2px 18px rgba(0, 0, 0, .5); }
.au-copy h2 { margin: 0; font: 800 clamp(1.7rem, 2.7vw, 2.9rem)/1.12 var(--font-display, "Segoe UI", sans-serif); letter-spacing: -.03em; color: #fff; text-shadow: 0 6px 30px rgba(0, 0, 0, .55); }
.au-rule { display: block; width: 46px; height: 4px; margin: 1rem 0 0; border-radius: 4px; background: linear-gradient(90deg, #2fe3cf, #3b82f6); }
.au-copy-r .au-rule { margin-left: auto; }
.au-ch { opacity: 0; transition: opacity .12s linear; } .au-ch.on { opacity: 1; }
.js .au-line { visibility: hidden; animation: au-unhide 0s 3.5s forwards; } .js .au-line.is-ready { visibility: visible; animation: none; }
@keyframes au-unhide { to { visibility: visible; } }

/* ---- floating feature tiles and the glowing links between them: behind the card, never in the way of a click ---- */
.au-net { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.au-net path { fill: none; stroke: #5ee0ff; stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 6 8; opacity: .8; animation: au-flow 3s linear infinite; vector-effect: non-scaling-stroke; }
@keyframes au-flow { to { stroke-dashoffset: -28; } }
.au-dot { position: fixed; z-index: 2; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: #8df0ff; box-shadow: 0 0 14px 3px rgba(94, 224, 255, .8); animation: au-pulse 2.4s ease-in-out infinite; pointer-events: none; }
@keyframes au-pulse { 50% { transform: scale(1.5); opacity: .6; } }
.au-tile { position: fixed; z-index: 3; width: 104px; height: 104px; margin: -52px 0 0 -52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem; border-radius: 26px; color: #fff; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .06)); border: 1px solid rgba(255, 255, 255, .3); box-shadow: 0 24px 50px -22px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .4);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); animation: au-float 6s ease-in-out infinite alternate; }
.au-tile svg { width: 40px; height: 40px; }
.au-tile span { font-size: .82rem; font-weight: 500; }
.au-t1 { left: 31.5%; top: 31%; transform: rotate(-4deg); } .au-t2 { left: 21.5%; top: 55%; animation-delay: 1.2s; transform: rotate(5deg); }
.au-t3 { left: 70%; top: 28%; animation-delay: .6s; transform: rotate(5deg); } .au-t4 { left: 82%; top: 56%; animation-delay: 1.8s; transform: rotate(-3deg); }
@keyframes au-float { from { translate: 0 -7px; } to { translate: 0 8px; } }

/* ---- the card: centred on the viewport (equal space above and below), scrolls when the window is short ---- */
.au-center { position: fixed; inset: 0; z-index: 4; display: flex; overflow-y: auto; overscroll-behavior: contain; padding: 104px 16px 104px; }
.auth-card { --text: #f1f7ff; --text-2: #dbe7fb; --muted: #c8d6ef; --border: rgba(255, 255, 255, .3); --border-strong: rgba(255, 255, 255, .42); --surface: transparent; --surface-2: rgba(255, 255, 255, .1); --surface-3: rgba(255, 255, 255, .14); --accent: #2fe3cf; --accent-ink: #042a33;
  box-sizing: border-box; margin: auto; width: min(500px, calc(100vw - 32px)); padding: 28px 34px 22px; border-radius: 30px; color: var(--text);
  background: linear-gradient(160deg, rgba(40, 72, 150, .52), rgba(8, 22, 66, .58)); border: 1px solid rgba(255, 255, 255, .3);
  box-shadow: 0 44px 90px -38px rgba(0, 0, 0, .8), 0 0 60px -26px rgba(34, 211, 238, .5), inset 0 1px 0 rgba(255, 255, 255, .32); -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3); animation: au-rise .7s cubic-bezier(.2, .9, .2, 1.1) both; }
@keyframes au-rise { from { opacity: 0; transform: translateY(22px) scale(.97); } to { opacity: 1; transform: none; } }
.au-card-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 1.1rem; }
.au-card-brand img { width: 64px; height: 64px; border-radius: 18px; box-shadow: 0 12px 30px -8px rgba(45, 212, 191, .6); }
.au-card-brand b { font-size: 2.1rem; }
.au-card-brand small { display: block; margin-top: 5px; font-size: .58rem; letter-spacing: .13em; text-transform: uppercase; color: #d6e5fa; max-width: 30ch; line-height: 1.5; }
.auth-card .auth-title { margin: .4rem 0 .35rem; font: 800 2rem/1.1 var(--font-display, "Segoe UI", sans-serif); letter-spacing: -.03em; color: #fff; }
.auth-card .au-sub, .auth-card .muted, .auth-card p { color: #dbe7fb; font-size: .95rem; }
.auth-card .au-sub { margin: 0 0 1.1rem; }
.auth-card a { color: #8ff5e6; text-decoration: none; }
.auth-card a:hover { text-decoration: underline; }
.auth-card .flash { border-radius: 14px; }
.auth-card .callout, .auth-card .alert { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); color: #e8f1ff; }
.auth-card form.stack { display: grid; gap: .85rem; }
.auth-card > * { animation: au-fade .6s both; } .auth-card > :nth-child(2) { animation-delay: .1s; } .auth-card > :nth-child(3) { animation-delay: .18s; } .auth-card > :nth-child(4) { animation-delay: .26s; } .auth-card > :nth-child(5) { animation-delay: .34s; } .auth-card > :nth-child(6) { animation-delay: .42s; }
@keyframes au-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.auth-card form .field { animation: au-slide .6s cubic-bezier(.2, .9, .2, 1.1) both; } .auth-card form .field:nth-of-type(2) { animation-delay: .12s; } .auth-card form .field:nth-of-type(3) { animation-delay: .22s; }
@keyframes au-slide { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }

/* ---- the animated fields ---- */
.auth-card .au-field { position: relative; display: block; margin: 0; scroll-margin-block: 110px; }
.auth-card .au-field > .au-fi { position: absolute; left: 18px; top: 50%; translate: 0 -50%; z-index: 2; display: grid; place-items: center; color: #d0defa; pointer-events: none; transition: color .25s, transform .35s cubic-bezier(.2, .9, .2, 1.4); }
.auth-card .au-field > .au-fi svg { width: 22px; height: 22px; }
.auth-card .au-field input { width: 100%; box-sizing: border-box; height: 56px; padding: 0 52px 0 54px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .38); background: rgba(8, 20, 60, .42); color: #fff; font: inherit; font-size: 1.02rem; outline: none; box-shadow: none;
  transition: border-color .25s, background .25s, box-shadow .35s, transform .3s cubic-bezier(.2, .9, .2, 1.3); }
.auth-card .au-field input::placeholder { color: rgba(255, 255, 255, .74); opacity: 1; }
.auth-card .au-field:hover input { background: rgba(8, 20, 60, .55); }
.auth-card .au-field.is-focus input, .auth-card .au-field input:focus-visible { border-color: #5eead4; background: rgba(8, 20, 60, .62); box-shadow: 0 0 0 4px rgba(94, 234, 212, .26), 0 14px 30px -16px rgba(94, 234, 212, .7); transform: translateY(-1px); }
.auth-card .au-field.is-focus > .au-fi { color: #5eead4; transform: scale(1.12); }
.auth-card .au-field.has-value:not(.is-focus) > .au-fi { color: #fff; }
.auth-card .au-field::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, #5eead4, #3b82f6, transparent); transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2, .9, .2, 1); pointer-events: none; }
.auth-card .au-field.is-focus::after { transform: scaleX(1); }
.auth-card .au-field input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 100px rgba(20, 44, 110, .95) inset; caret-color: #fff; }
.auth-card .au-eye { position: absolute; right: 6px; top: 50%; translate: 0 -50%; z-index: 3; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: #d0defa; cursor: pointer; transition: background .2s, color .2s; }
.auth-card .au-eye:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.auth-card .au-eye svg { width: 22px; height: 22px; }
.auth-card .au-row { display: flex; justify-content: flex-end; margin: -.15rem 0 .1rem; font-size: .95rem; }
.auth-card .au-row a { display: inline-flex; align-items: center; min-height: 44px; }
.auth-card .btn-primary, .auth-card button[type="submit"].btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: .6rem; width: 100%; min-height: 56px; border: 0; border-radius: 999px; font: 800 1.1rem/1 inherit; color: #03302f;
  background: linear-gradient(90deg, #17e6c8, #2dd4e8 55%, #3bb7f6); box-shadow: 0 18px 40px -16px rgba(23, 230, 200, .8), inset 0 1px 0 rgba(255, 255, 255, .5); cursor: pointer; transition: transform .25s cubic-bezier(.2, .9, .2, 1.3), box-shadow .25s; }
.auth-card .btn-primary::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg); animation: au-shine 4.5s ease-in-out infinite; pointer-events: none; }
@keyframes au-shine { 0%, 60% { left: -40%; } 100% { left: 130%; } }
.auth-card .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 24px 46px -16px rgba(23, 230, 200, .95), inset 0 1px 0 rgba(255, 255, 255, .5); }
.auth-card .btn-primary:active { transform: translateY(0) scale(.99); }
.auth-card .btn-primary svg { width: 20px; height: 20px; transition: transform .25s; } .auth-card .btn-primary:hover svg { transform: translateX(4px); }
.auth-card .au-or { display: flex; align-items: center; gap: 1rem; margin: 1rem 0 .9rem; color: #d0defa; font-size: .9rem; }
.auth-card .au-or::before, .auth-card .au-or::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .3); }
.auth-card .au-ghost { display: flex; align-items: center; justify-content: center; gap: .65rem; min-height: 52px; border: 1.5px solid rgba(255, 255, 255, .72); border-radius: 999px; color: #fff; font-weight: 700; font-size: 1.02rem; text-decoration: none; transition: background .25s, transform .25s cubic-bezier(.2, .9, .2, 1.3), border-color .25s; }
.auth-card .au-ghost:hover { background: rgba(255, 255, 255, .16); border-color: #fff; transform: translateY(-2px); text-decoration: none; }
.auth-card .au-ghost svg { width: 21px; height: 21px; }
.auth-card .au-secure { display: flex; align-items: center; justify-content: center; gap: .55rem; margin: 1.2rem 0 0; color: #d6e5fa; font-size: .85rem; text-align: center; }
.auth-card .au-secure svg { flex: none; width: 18px; height: 18px; color: #d6e5fa; }
.auth-card .auth-links { margin-top: 1rem; font-size: .9rem; text-align: center; }
.auth-card label.field > span:not(.sr-only) { color: #dbe7fb; }
.auth-card input[type="text"], .auth-card input[type="email"], .auth-card input[type="password"], .auth-card input[type="number"] { color: #fff; }

/* ---- the strip of features along the bottom ---- */
.au-strip { position: fixed; inset: auto 0 0 0; z-index: 5; display: grid; grid-template-columns: repeat(8, 1fr); align-items: start; padding: 0 clamp(12px, 3vw, 56px) 20px; pointer-events: none; }
.au-strip > div { display: flex; flex-direction: column; align-items: center; gap: .55rem; text-align: center; color: #e6f0ff; font-size: .88rem; line-height: 1.3; position: relative; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.au-strip > div + div::before { content: ""; position: absolute; left: 0; top: 10px; height: 44px; width: 1px; background: rgba(255, 255, 255, .18); }
.au-strip svg { box-sizing: content-box; width: 26px; height: 26px; padding: 14px; border-radius: 50%; color: #b9ecff; background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .24), rgba(255, 255, 255, .06)); border: 1px solid rgba(255, 255, 255, .24); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .6); }

/* ---- screen sizes ---- */
@media (max-width: 1559px) { .au-tile, .au-net, .au-dot { display: none; } }
@media (max-width: 1360px) { .au-copy { display: none; } }
@media (max-width: 1100px) { .au-strip { grid-template-columns: repeat(4, 1fr); row-gap: .6rem; } .au-strip > div:nth-child(n+5) { display: none; } }
@media (max-height: 960px) { .au-strip { display: none; } .au-center { padding-bottom: 28px; } }
@media (max-height: 820px) {
  .au-center { padding-top: 88px; }
  .auth-card { padding: 20px 30px 16px; } .au-card-brand { margin-bottom: .55rem; } .au-card-brand img { width: 54px; height: 54px; } .au-card-brand b { font-size: 1.85rem; }
  .auth-card .auth-title { font-size: 1.7rem; margin-top: .2rem; } .auth-card .au-sub { margin-bottom: .8rem; }
  .auth-card .au-field input { height: 50px; } .auth-card .btn-primary { min-height: 52px; } .auth-card .au-ghost { min-height: 48px; } .auth-card .au-or { margin: .7rem 0; } .auth-card .au-secure { margin-top: .8rem; }
}

/* phones and small tablets: a natural scrolling page (the keyboard can open and the form can scroll), subtle photograph on dark navy */
@media (max-width: 767px) {
  .au-top { position: absolute; padding: calc(14px + env(safe-area-inset-top)) 16px 10px; }
  .au-brand small, .au-demo > span, .au-strip, .au-copy, .au-tile, .au-net, .au-dot { display: none; }
  .au-brand img { width: 46px; height: 46px; border-radius: 13px; } .au-brand b { font-size: 1.5rem; }
  .au-pillbtn { height: 44px; padding: 0 1rem; font-size: .9rem; }
  .au-center { position: relative; inset: auto; z-index: 4; display: flex; overflow: visible; min-height: 100vh; min-height: 100dvh; padding: calc(84px + env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom)); }
  .auth-card { margin: 0 auto; width: min(100% - 32px, 460px); width: min(100%, 460px); padding: 24px; border-radius: 26px; -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }
  .au-card-brand img { width: 52px; height: 52px; } .au-card-brand b { font-size: 1.7rem; }
  .auth-card .auth-title { font-size: 1.7rem; }
  .auth-card .au-field input { height: 52px; font-size: 16px; }   /* 16px stops iOS zooming into the field */
  .auth-card .btn-primary { min-height: 52px; } .auth-card .au-ghost { min-height: 50px; }
  .has-photo .au-photo { opacity: .6; } .au-shade { background: linear-gradient(180deg, rgba(3, 10, 38, .72), rgba(5, 18, 58, .5) 45%, rgba(3, 10, 38, .88)); }
  .au-waves { height: 90px; }
  .au-ambient { animation: none; opacity: .8; }
}
@media (max-width: 520px) { .au-demo { font-size: 0; } .au-pillbtn { font-size: .88rem; } }
@media (max-width: 360px) { .auth-card { padding: 20px 16px; } .au-card-brand small { display: none; } }

/* low-powered devices, data saver and reduced motion: the background holds still */
.au-lite .au-photo, .au-lite .au-ambient, .au-lite .au-wave, .au-lite .au-tile, .au-lite .au-net path, .au-lite .au-dot, .au-lite .auth-card .btn-primary::after { animation: none !important; }
.au-lite .auth-card, .au-lite .au-tile { -webkit-backdrop-filter: none; backdrop-filter: none; } .au-lite .auth-card { background: linear-gradient(160deg, rgba(24, 48, 110, .9), rgba(8, 22, 66, .92)); }
@media (prefers-reduced-motion: reduce) { .au-scene *, .au-tile, .au-dot, .au-net path, .auth-card, .auth-card *, .auth-card .btn-primary::after { animation: none !important; transition: none !important; } .au-ch { opacity: 1; } .js .au-line { visibility: visible; animation: none; } }
.au-paused .au-photo, .au-paused .au-ambient, .au-paused .au-wave, .au-paused .au-tile, .au-paused .au-net path { animation-play-state: paused; }
