body {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.card {
  width: 100%;
  max-width: 420px;
}

h2 {
  margin: 0 0 10px 0;
  font-size: 18px;
  color: var(--accent);
  text-align: center;
  font-weight: 700;
}

.form-row {
  margin-top: 10px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
}

input[type="password"] {
  font-size: 15px;
}

.btn {
  width: 100%;
  padding: 12px 14px;
  margin-top: 14px;
}

.error {
  color: #ffd1d1;
  background: rgba(255, 93, 93, 0.12);
  border: 1px solid rgba(255, 93, 93, 0.22);
  padding: 8px 10px;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  margin-bottom: 10px;
  animation: error-enter 220ms ease, error-shake 360ms ease 80ms;
}

.error.hidden {
  display: none;
}

.foot {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 420px) {
  .card {
    padding: 16px;
  }
}

@keyframes error-enter {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes error-shake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  50% {
    transform: translateX(4px);
  }
  75% {
    transform: translateX(-2px);
  }
  100% {
    transform: translateX(0);
  }
}
