@font-face {
  font-family: Inter;
  src: url('/fonts/inter-cyrillic-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Inter;
  src: url('/fonts/inter-latin-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font: 400 14px/1.4 Inter, system-ui, sans-serif;
  color: #fff;
  color-scheme: dark;
  background:
    radial-gradient(ellipse 26% 58% at -7% 53%, #1338d2 0%, #071762 45%, transparent 88%),
    radial-gradient(ellipse 28% 54% at 107% 58%, #2b20ca 0%, #131878 47%, transparent 88%),
    radial-gradient(ellipse 68% 85% at 50% 38%, #0a1539 0%, #050e2b 55%, #040b22 100%);
}

.academy-login {
  /* Center within the viewport, independently of any siblings added to body. */
  position: absolute;
  inset: 0 0 auto;
  width: min(calc(100% - 40px), 476px);
  min-height: 100vh;
  min-height: 100dvh;
  margin-inline: auto;
  padding-block: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-brand { width: 62.3%; margin: 0 auto 28px; }

.login-form {
  width: min(100%, 264px);
  margin-inline: auto;
  display: grid;
}

.login-form label {
  color: #cad8f0;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 6px;
}

.login-field {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 13px;
}

.login-field > svg {
  position: absolute;
  left: 11px;
  width: 15px;
  height: 15px;
  color: #657eac;
  pointer-events: none;
}

.login-field input {
  width: 100%;
  min-height: 35px;
  padding: 7px 38px 7px 33px;
  border: 1px solid #c3d1e8;
  border-radius: 7px;
  background: #fff;
  color: #172b49;
  color-scheme: light;
  font: inherit;
}

.login-field input::placeholder { color: #667c99; }
.login-field input::-ms-reveal { display: none; }

.login-toggle {
  position: absolute;
  inset: 1px 1px 1px auto;
  width: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #657eac;
  cursor: pointer;
}

.login-toggle:not([hidden]) { display: grid; place-items: center; }
.login-toggle[aria-pressed="true"], .login-toggle:hover { color: #214d99; }
.login-toggle svg { width: 16px; height: 16px; }

.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  min-height: 36px;
  margin-top: 4px;
  border: 1px solid #63e1ff;
  border-radius: 7px;
  background: linear-gradient(110deg, #269efa 0%, #125aff 54%, #2c41eb 100%);
  box-shadow: inset 0 1px 4px #aceaff80, 0 0 16px #147aff45;
  color: #fff;
  font: inherit;
  font-weight: 650;
  text-shadow: 0 1px 2px #123699;
  cursor: pointer;
}

.login-submit:hover { filter: brightness(1.12); }
.login-submit:active { filter: brightness(.95); }
.login-submit svg { width: 16px; height: 16px; }

.login-form :focus-visible {
  outline: 2px solid #74e9ff;
  outline-offset: 2px;
}

.login-toggle:focus-visible { outline-offset: -3px; outline-color: #214d99; }

.login-error {
  margin: -2px 0 6px;
  color: #ffd1d7;
  font-size: 12px;
}

@media (max-width: 550px), (pointer: coarse) {
  .login-brand p { margin-top: 5px; font-size: clamp(10px, 3vw, 12px); text-wrap: balance; }
  .login-form { width: min(100%, 310px); }
  .login-field input, .login-submit { min-height: 44px; font-size: 16px; }
  .login-form label { font-size: 13px; }
  .login-toggle { width: 44px; }
  .login-field input { padding-right: 46px; }
}
