.login { display: grid; place-items: center; padding: 1.5rem 1rem; }
.card {
  width: min(100%, 400px);
  padding: 2.25rem 2rem;
  background: rgba(14, 11, 30, .74);
  border: 1px solid rgba(167, 139, 250, .28);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: rise .6s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.card .brand { margin-bottom: 1.5rem; }
.tagline { margin: 0; color: var(--muted); font-size: .75rem; letter-spacing: .3em; text-transform: uppercase; }
.alert {
  margin: 0 0 1rem;
  padding: .75rem .9rem;
  border: 1px solid rgba(244, 63, 94, .5);
  border-radius: var(--radius);
  background: rgba(136, 19, 55, .35);
  color: var(--danger);
  font-size: .9rem;
}
form { display: flex; flex-direction: column; }
label { margin-bottom: .4rem; color: var(--muted); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
input {
  width: 100%;
  min-height: 48px;
  margin-bottom: 1.1rem;
  padding: .7rem .9rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius);
  background: rgba(5, 4, 12, .7);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}
input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(139, 92, 246, .35); }
input[aria-invalid="true"] { border-color: #f43f5e; }
.password { position: relative; }
.password input { padding-right: 4.5rem; }
.password button {
  position: absolute;
  top: 6px;
  right: 6px;
  height: 36px;
  min-width: 56px;
  border: 0;
  border-radius: 9px;
  background: rgba(139, 92, 246, .22);
  color: var(--text);
  font: inherit;
  font-size: .75rem;
  cursor: pointer;
}
.password button:hover { background: rgba(139, 92, 246, .45); }
#login-button { margin-top: .5rem; }
.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 420px) { .card { padding: 1.75rem 1.25rem; } }
/* Short screens, e.g. phones in landscape. */
@media (max-height: 520px) {
  .login { padding-block: .5rem; }
  .card { padding-block: .9rem; }
  .card .brand { flex-direction: row; justify-content: center; margin-bottom: .6rem; }
  .card .brand img { width: 36px; height: 36px; }
  .tagline { display: none; }
  .alert { margin-bottom: .5rem; padding-block: .4rem; }
  label { margin-bottom: .2rem; }
  input { min-height: 40px; margin-bottom: .55rem; padding-block: .4rem; }
  .password button { top: 2px; }
  #login-button { margin-top: .1rem; }
}
