/* Styles shared by the public sign-in and access-denied pages. */
@font-face { font-family: Outfit; src: url("/login/fonts/outfit-variable.ttf") format("truetype"); font-style: normal; font-weight: 100 900; font-display: swap; }
:root {
  color-scheme: light;
  font-family: Outfit, Arial, sans-serif;
  color: #11284a;
  background: #f5f8fc;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { min-height: 100svh; margin: 0; display: grid; place-items: center; padding: 32px 20px; }
main { width: min(100%, 420px); padding: 40px; border: 1px solid #d5e1ef; background: #fff; }
/* Change these three colours to recolour the original white PNG masks. */
.login-scene {
  --gear-big-color: #c8daef;
  --gear-mid-color: #9ebfe7;
  --gear-small-color: #0865f5;
  --gear-small-offset: 9deg; /* Adjust tooth alignment; negative values rotate anticlockwise. */
  --gear-tooth-period: calc(8s / 21); /* Shared speed: small gear completes one turn in 8s. */
  position: relative;
  isolation: isolate;
  width: min(100%, 420px);
}
.login-scene main { position: relative; z-index: 1; width: 100%; }
.login-gears { position: absolute; inset: 0; pointer-events: none; }
.gear {
  position: absolute;
  display: block;
  aspect-ratio: 1;
  background-color: var(--gear-color);
  -webkit-mask: var(--gear-image) center / contain no-repeat;
  mask: var(--gear-image) center / contain no-repeat;
  animation: gear-turn calc(var(--gear-tooth-period) * var(--gear-teeth)) linear infinite;
  animation-play-state: paused;
}
.gear-big { --gear-teeth: 50; --gear-color: var(--gear-big-color); --gear-image: url('/login/images/big-gear.png'); width: 72%; top: -65px; left: -70px; }
.gear-mid { --gear-teeth: 34; --gear-color: var(--gear-mid-color); --gear-image: url('/login/images/mid-gear.png'); width: 54%; right: -50px; bottom: -70px; animation-direction: reverse; }
.gear-small { --gear-teeth: 21; --gear-color: var(--gear-small-color); --gear-image: url('/login/images/smol-gear.png'); width: 34%; right: -65px; bottom: 132px; }
/* Independent rotation keeps the offset throughout the spin animation. */
.gear-small { rotate: var(--gear-small-offset); }
.login-scene.gears-running .gear { animation-play-state: running; }
@keyframes gear-turn { to { transform: rotate(360deg); } }
@media (max-width: 620px) {
  .login-scene { width: min(calc(100% - 48px), 420px); }
  .gear-big { left: -36px; top: -44px; }
  .gear-mid { right: -36px; bottom: -38px; }
  .gear-small { right: -32px; bottom: 165px; }
}
@media (prefers-reduced-motion: reduce) { .gear { animation: none; } }
/* Frame the existing logo without the large whitespace in its source PNG. */
.brand { position: relative; aspect-ratio: 1224 / 280; overflow: hidden; margin: 0 0 36px; }
.brand img { position: absolute; width: 118.3007%; height: auto; max-width: none; left: -10.5392%; top: -145.7143%; }
label { display: block; font-size: 16px; font-weight: 600; margin-bottom: 9px; }
input { display: block; width: 100%; min-height: 46px; border: 1px solid #cbd8e9; border-radius: 0; background: #fff; color: #11284a; padding: 12px; font: inherit; font-size: 18px; margin: 0 0 24px; }
input:focus-visible, button:focus-visible { outline: 2px solid #1670ff; outline-offset: 3px; }
input:focus { border-color: #1670ff; }
.show-password { display: flex; align-items: center; gap: 10px; margin: -10px 0 24px; font-size: 14px; font-weight: 400; cursor: pointer; }
.show-password input { width: 18px; min-height: 18px; height: 18px; padding: 0; margin: 0; }
button { width: 100%; min-height: 46px; border: 1px solid #0865f5; border-radius: 8px; background: #0865f5; color: #fff; padding: 12px 16px; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
button:hover { background: #0054d5; border-color: #0054d5; }
button:disabled { opacity: .65; cursor: wait; }
#error { color: #b3261e; font-size: 15px; line-height: 1.5; margin: -8px 0 20px; }
#error:empty { display: none; }
.access-title { margin: 0 0 16px; font-size: 26px; line-height: 1.3; }
.access-message { margin: 0 0 20px; color: #435b7c; font-size: 16px; line-height: 1.6; }
.access-link { border-radius: 8px; display: block; padding: 14px 16px; background: #0865f5; color: #fff; font-size: 16px; font-weight: 600; text-align: center; text-decoration: none; }
.access-link:hover { background: #0054d5; }
.access-link:focus-visible { outline: 2px solid #1670ff; outline-offset: 3px; }
@media (max-width: 440px) { main { padding: 32px 24px; } .brand { margin-bottom: 32px; } }
.login-scene[hidden], #session-loading[hidden] { display: none; }
#session-loading .session-logo { width: 160px; margin: 0 auto; }
/* Keep the card centred independently of the footer. Equal vertical clearance
   leaves room for the gears and footer when a short viewport needs to scroll. */
.login-page { position: relative; grid-template-columns: minmax(0, 1fr); padding-block: 96px; }
.login-scene[hidden] ~ .login-footer { display: none; }
.login-footer { position: absolute; bottom: 16px; left: 20px; right: 20px; color: #68717d; font-size: 12px; line-height: 1.6; text-align: center; }
.login-footer p { margin: 0 0 4px; }
.login-footer a { color: inherit; text-underline-offset: 3px; }
.login-footer a:hover { color: #11284a; }
.login-footer a:focus-visible { outline: 2px solid #1670ff; outline-offset: 3px; }
