.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: #f4f6fa;
}

.login-layout {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: 40px 24px;
}

.login-content {
  width: min(100%, 448px);
}

.login-brand {
  display: grid;
  justify-items: center;
  gap: 9px;
  margin: 0 auto 24px;
  color: #17223a;
  text-align: center;
}

.login-brand-symbol {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid #d9e1ed;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(23, 34, 58, 0.08);
  color: #17223a;
  font-size: 29px;
  font-weight: 800;
}

.login-brand-copy {
  display: grid;
  gap: 2px;
}

.login-brand-copy strong {
  font-size: 16px;
  letter-spacing: 0.1em;
}

.login-brand-copy small {
  color: #718199;
  font-size: 12px;
}

.login-card {
  width: 100%;
  padding: clamp(24px, 6vw, 34px);
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(23, 34, 58, 0.09);
}

.login-heading {
  margin: 0 0 25px;
  text-align: center;
}

.login-heading h1 {
  margin: 0;
  color: #202b41;
  font-size: 22px;
  font-weight: 750;
}

.login-heading p {
  margin: 8px 0 0;
  color: #667990;
  font-size: 13px;
  line-height: 1.8;
}

.login-card .login-form {
  display: grid;
  align-items: stretch;
  gap: 19px;
  padding: 0;
}

.login-field {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: #35445a;
  font-size: 12px;
}

.login-field label {
  font-weight: 700;
}

.login-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cfd9e7;
  border-radius: 9px;
  background: #fff;
  color: #202b41;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.login-input::placeholder {
  color: #9aa7b8;
}

.login-input:focus-visible,
.password-toggle:focus-visible {
  outline: 3px solid rgba(53, 92, 152, 0.2);
  outline-offset: 2px;
  border-color: #355c98;
}

.password-control {
  position: relative;
}

.password-control .login-input {
  padding-left: 48px;
  text-align: left;
  direction: ltr;
}

.password-toggle {
  position: absolute;
  top: 50%;
  left: 8px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #718199;
}

.password-toggle:hover {
  background: #f1f4f8;
  color: #35445a;
}

.password-icon,
.submit-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.password-icon--hide,
.password-toggle[aria-pressed="true"] .password-icon--show {
  display: none;
}

.password-toggle[aria-pressed="true"] .password-icon--hide {
  display: block;
}

.password-help {
  margin: 1px 0 0;
  color: #718199;
  font-size: 11px;
  line-height: 1.8;
}

.login-error {
  margin: 0;
  padding: 11px 13px;
  border: 1px solid #efc8c2;
  border-radius: 9px;
  background: #fff4f2;
  color: #a43c3c;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.login-submit {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 1px;
  border-radius: 10px;
  font-size: 14px;
  transition: background-color 140ms ease, opacity 140ms ease;
}

.login-submit:hover {
  background: #294b80;
}

.login-submit:focus-visible {
  outline: 3px solid rgba(53, 92, 152, 0.25);
  outline-offset: 3px;
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.8;
}

.login-spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
}

.login-submit[aria-busy="true"] .login-spinner {
  display: inline-block;
  animation: login-spin 700ms linear infinite;
}

.login-submit[aria-busy="true"] .submit-icon {
  display: none;
}

@keyframes login-spin {
  to { transform: rotate(360deg); }
}

.login-footer {
  margin: 19px 0 0;
  color: #8996a8;
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
}

@media (max-width: 480px) {
  .login-layout {
    padding: 24px 16px;
  }

  .login-brand {
    margin-bottom: 19px;
  }

  .login-brand-symbol {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    font-size: 26px;
  }

  .login-card {
    padding: 25px 20px;
    border-radius: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
