:root {
  --login-navy: #0c2941;
  --login-navy-soft: #173b57;
  --login-orange: #f36c45;
  --login-orange-dark: #d94e2d;
  --login-paper: #f2efed;
  --login-muted: #6e7d88;
  --login-border: #dce3e7;
  --login-danger: #a52c20;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--login-paper);
  color: var(--login-navy);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

.access-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 3rem);
}

.access-shell {
  width: min(1120px, 100%);
  min-height: min(720px, calc(100dvh - 3rem));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
  overflow: hidden;
  border: 1px solid rgba(12, 41, 65, .08);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(12, 41, 65, .18);
  animation: shell-arrival .7s cubic-bezier(.2, .8, .2, 1) both;
}

.illustration-panel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: var(--login-paper);
  isolation: isolate;
}

.illustration-copy {
  position: absolute;
  z-index: 3;
  top: clamp(1.6rem, 4vw, 3.5rem);
  left: clamp(1.6rem, 4vw, 3.8rem);
  max-width: 290px;
  display: grid;
  gap: .25rem;
}

.illustration-copy .eyebrow {
  color: var(--login-orange-dark);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.illustration-copy strong {
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1;
  letter-spacing: -.04em;
}

.illustration-copy > span:last-child {
  color: var(--login-muted);
  font-size: .92rem;
  line-height: 1.5;
}

.worker-illustration {
  position: absolute;
  inset: 15% 6% 2% 11%;
  z-index: 2;
  width: 83%;
  height: 83%;
  object-fit: contain;
  object-position: center bottom;
  animation: worker-arrival 1.15s .08s cubic-bezier(.16, .8, .2, 1) both;
}

.form-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4.6rem);
  background: #fff;
}

.form-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: var(--login-orange);
}

.gear-stage {
  --gear-size: clamp(135px, 24vmin, 250px);
  position: relative;
  width: var(--gear-size);
  height: var(--gear-size);
  align-self: center;
  display: grid;
  place-items: center;
  margin: clamp(-2rem, -2vh, -.75rem) 0 clamp(-2rem, -2vh, -.5rem);
}

.gear-stage img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  animation: gear-float 4.5s ease-in-out infinite;
}

.gear-halo {
  position: absolute;
  width: 64%;
  height: 18%;
  bottom: 4%;
  border-radius: 50%;
  background: rgba(12, 41, 65, .13);
  filter: blur(10px);
  animation: halo-breathe 4.5s ease-in-out infinite;
}

.welcome {
  margin-bottom: 1.7rem;
  text-align: center;
}

.welcome .version {
  display: inline-flex;
  margin-bottom: .8rem;
  padding: .26rem .72rem;
  border-radius: 99px;
  background: rgba(243, 108, 69, .12);
  color: var(--login-orange-dark);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.welcome h1 {
  margin: 0;
  color: var(--login-navy);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 780;
  letter-spacing: -.04em;
}

.welcome p {
  margin: .45rem 0 0;
  color: var(--login-muted);
  font-size: .92rem;
}

.access-form {
  display: grid;
  gap: 1rem;
}

.login-field label {
  display: block;
  margin-bottom: .42rem;
  font-size: .82rem;
  font-weight: 750;
}

.login-field input {
  width: 100%;
  height: 50px;
  border: 1px solid var(--login-border);
  border-radius: 12px;
  background: #f9fbfc;
  color: var(--login-navy);
  font: inherit;
  padding: 0 .9rem;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-field input:focus {
  border-color: var(--login-orange);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(243, 108, 69, .15);
}

.password-control {
  position: relative;
}

.password-control input {
  padding-right: 4.7rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: .55rem;
  translate: 0 -50%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--login-navy-soft);
  font-size: .78rem;
  font-weight: 750;
  padding: .4rem .55rem;
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: rgba(12, 41, 65, .07);
  outline: none;
}

.remember-control {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--login-muted);
  font-size: .86rem;
  cursor: pointer;
}

.remember-control input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--login-orange);
}

.login-submit {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  margin-top: .25rem;
  border: 0;
  border-radius: 12px;
  background: var(--login-orange);
  color: #fff;
  font: inherit;
  font-weight: 800;
  box-shadow: 0 12px 22px rgba(217, 78, 45, .24);
  cursor: pointer;
  transition: translate .18s ease, background .18s ease, box-shadow .18s ease;
}

.login-submit:hover {
  translate: 0 -2px;
  background: var(--login-orange-dark);
  box-shadow: 0 16px 26px rgba(217, 78, 45, .3);
}

.login-submit:active {
  translate: 0 0;
}

.login-submit:focus-visible {
  outline: 3px solid rgba(243, 108, 69, .35);
  outline-offset: 3px;
}

.login-alert {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: .65rem;
  border: 1px solid #f0b8b1;
  border-radius: 12px;
  background: #fff5f3;
  color: var(--login-danger);
  padding: .7rem .8rem;
  font-size: .86rem;
}

.login-alert span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--login-danger);
  color: #fff;
  font-weight: 850;
}

.login-alert p,
.signature {
  margin: 0;
}

.signature {
  margin-top: 1.6rem;
  color: #96a2ab;
  font-size: .76rem;
  text-align: center;
}

@keyframes shell-arrival {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes worker-arrival {
  from {
    transform: translateX(-120%);
  }
  to { transform: translateX(0); }
}

@keyframes gear-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}

@keyframes halo-breathe {
  0%, 100% { opacity: .55; transform: scale(.86); }
  50% { opacity: 1; transform: scale(1.08); }
}

@media (max-width: 880px) {
  .access-page {
    padding: 1rem;
  }

  .access-shell {
    width: min(520px, 100%);
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .illustration-panel {
    display: none;
  }

  .form-panel {
    min-height: calc(100dvh - 2rem);
    padding: clamp(2rem, 8vw, 4rem);
  }
}

@media (max-width: 430px) {
  .access-page {
    padding: 0;
  }

  .access-shell,
  .form-panel {
    min-height: 100dvh;
    border-radius: 0;
  }

  .form-panel {
    padding: 1.5rem;
  }

  .gear-stage {
    margin-top: 0;
  }
}

@media (max-height: 620px), (max-width: 350px) {
  .gear-stage {
    display: none;
  }

  .welcome {
    margin-top: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
