* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

.admin-auth-page {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-main);
  color: var(--admin-text-blue);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.78) 0, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #c7dcf1 0%, #eef5ff 74%, #f8fbff 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button,
input {
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
}

button:focus-visible {
  outline: 2px solid var(--admin-text-blue);
  outline-offset: 3px;
}

.auth-header {
  display: grid;
  place-items: center;
  grid-template-rows: 52px;
  min-height: 82px;
  padding: 18px 40px;
}

.auth-header img {
  display: block;
  width: 58px;
  height: auto;
}

.auth-main {
  display: grid;
  place-items: start center;
  min-height: calc(100vh - 82px);
  padding: 133px 24px 56px;
}

.auth-card {
  width: min(100%, 460px);
  min-height: 412px;
  padding: 37px 38px 36px;
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(30, 68, 135, 0.06);
}

.auth-intro {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.auth-intro h1 {
  margin: 0;
  font-size: 29px;
  font-weight: 700;
  line-height: 1.08;
}

.auth-intro p {
  margin: 0;
  font-size: 15px;
  line-height: 1.32;
}

.auth-form,
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-field {
  gap: 8px;
}

.auth-field label {
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.auth-field input {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: #dce9f8;
  color: var(--admin-text-blue);
  -webkit-text-fill-color: var(--admin-text-blue);
  caret-color: var(--admin-text-blue);
  font-size: 16px;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.auth-field input:focus,
.auth-password-control:focus-within {
  outline: 2px solid rgba(36, 75, 145, 0.42);
  outline-offset: 2px;
}

.auth-password-control {
  display: flex;
  align-items: center;
  border-radius: 8px;
  background: #dce9f8;
  padding-right: 14px;
}

.auth-password-control input:focus {
  outline: none;
}

.auth-password-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-submit {
  width: 100%;
  min-height: 40px;
  margin-top: 4px;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--admin-text-blue);
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.auth-submit:hover {
  background: #123f86;
}

.auth-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.auth-error {
  margin: 0;
  color: #b33122;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

@media (width < 768px) {
  .auth-header {
    position: relative;
    left: 50%;
    width: 390px;
    grid-template-rows: 51px;
    min-height: 79px;
    padding: 16px 16px 12px;
    transform: translateX(-50%);
  }

  .auth-main {
    position: relative;
    left: 50%;
    width: 390px;
    min-height: auto;
    padding: 37px 16px 40px;
    transform: translateX(-50%);
  }

  .auth-card {
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .auth-intro {
    align-items: center;
    gap: 12px;
    text-align: center;
  }

  .auth-intro h1 {
    font-size: 20px;
    line-height: 1.2;
  }

  .auth-intro p {
    font-size: 14px;
    line-height: 1.24;
  }

  .auth-form {
    gap: 27px;
  }

  .auth-password-toggle span {
    display: none;
  }

  .auth-submit {
    margin-top: -1px;
  }
}
